Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: Source/platform/fonts/harfbuzz/HarfBuzzShaper.cpp

Issue 263363005: Initial patch for FontVariant, variant like HalfWidth should take Complex Path (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@emoji_android
Patch Set: Updating Test Expectation Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/platform/fonts/Font.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 Google Inc. All rights reserved. 2 * Copyright (c) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 BlackBerry Limited. All rights reserved. 3 * Copyright (C) 2013 BlackBerry Limited. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 case FontDescription::DisabledLigaturesState: 515 case FontDescription::DisabledLigaturesState:
516 m_features.append(noCalt); 516 m_features.append(noCalt);
517 break; 517 break;
518 case FontDescription::EnabledLigaturesState: 518 case FontDescription::EnabledLigaturesState:
519 // calt is on by default 519 // calt is on by default
520 break; 520 break;
521 case FontDescription::NormalLigaturesState: 521 case FontDescription::NormalLigaturesState:
522 break; 522 break;
523 } 523 }
524 524
525 static hb_feature_t hwid = { HB_TAG('h', 'w', 'i', 'd'), 1, 0, static_cast<u nsigned>(-1) };
526 static hb_feature_t twid = { HB_TAG('t', 'w', 'i', 'd'), 1, 0, static_cast<u nsigned>(-1) };
527 static hb_feature_t qwid = { HB_TAG('d', 'w', 'i', 'd'), 1, 0, static_cast<u nsigned>(-1) };
528 switch (description.widthVariant()) {
529 case HalfWidth:
530 m_features.append(hwid);
531 break;
532 case ThirdWidth:
533 m_features.append(twid);
534 break;
535 case QuarterWidth:
536 m_features.append(qwid);
537 break;
538 case RegularWidth:
539 break;
540 }
541
525 FontFeatureSettings* settings = description.featureSettings(); 542 FontFeatureSettings* settings = description.featureSettings();
526 if (!settings) 543 if (!settings)
527 return; 544 return;
528 545
529 unsigned numFeatures = settings->size(); 546 unsigned numFeatures = settings->size();
530 for (unsigned i = 0; i < numFeatures; ++i) { 547 for (unsigned i = 0; i < numFeatures; ++i) {
531 hb_feature_t feature; 548 hb_feature_t feature;
532 const AtomicString& tag = settings->at(i).tag(); 549 const AtomicString& tag = settings->at(i).tag();
533 feature.tag = HB_TAG(tag[0], tag[1], tag[2], tag[3]); 550 feature.tag = HB_TAG(tag[0], tag[1], tag[2], tag[3]);
534 feature.value = settings->at(i).value(); 551 feature.value = settings->at(i).value();
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 point.x() + fromX, point.x() + toX, 1141 point.x() + fromX, point.x() + toX,
1125 point.y(), height); 1142 point.y(), height);
1126 } 1143 }
1127 1144
1128 return Font::pixelSnappedSelectionRect( 1145 return Font::pixelSnappedSelectionRect(
1129 point.x() + toX, point.x() + fromX, 1146 point.x() + toX, point.x() + fromX,
1130 point.y(), height); 1147 point.y(), height);
1131 } 1148 }
1132 1149
1133 } // namespace blink 1150 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/fonts/Font.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698