| OLD | NEW |
| 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 case FontDescription::DisabledLigaturesState: | 511 case FontDescription::DisabledLigaturesState: |
| 512 m_features.append(noCalt); | 512 m_features.append(noCalt); |
| 513 break; | 513 break; |
| 514 case FontDescription::EnabledLigaturesState: | 514 case FontDescription::EnabledLigaturesState: |
| 515 // calt is on by default | 515 // calt is on by default |
| 516 break; | 516 break; |
| 517 case FontDescription::NormalLigaturesState: | 517 case FontDescription::NormalLigaturesState: |
| 518 break; | 518 break; |
| 519 } | 519 } |
| 520 | 520 |
| 521 static hb_feature_t hwid = { HB_TAG('h', 'w', 'i', 'd'), 1, 0, static_cast<u
nsigned>(-1) }; |
| 522 static hb_feature_t twid = { HB_TAG('t', 'w', 'i', 'd'), 1, 0, static_cast<u
nsigned>(-1) }; |
| 523 static hb_feature_t qwid = { HB_TAG('d', 'w', 'i', 'd'), 1, 0, static_cast<u
nsigned>(-1) }; |
| 524 switch (description.widthVariant()) { |
| 525 case HalfWidth: |
| 526 m_features.append(hwid); |
| 527 break; |
| 528 case ThirdWidth: |
| 529 m_features.append(twid); |
| 530 break; |
| 531 case QuarterWidth: |
| 532 m_features.append(qwid); |
| 533 break; |
| 534 case RegularWidth: |
| 535 break; |
| 536 } |
| 537 |
| 521 FontFeatureSettings* settings = description.featureSettings(); | 538 FontFeatureSettings* settings = description.featureSettings(); |
| 522 if (!settings) | 539 if (!settings) |
| 523 return; | 540 return; |
| 524 | 541 |
| 525 unsigned numFeatures = settings->size(); | 542 unsigned numFeatures = settings->size(); |
| 526 for (unsigned i = 0; i < numFeatures; ++i) { | 543 for (unsigned i = 0; i < numFeatures; ++i) { |
| 527 hb_feature_t feature; | 544 hb_feature_t feature; |
| 528 const AtomicString& tag = settings->at(i).tag(); | 545 const AtomicString& tag = settings->at(i).tag(); |
| 529 feature.tag = HB_TAG(tag[0], tag[1], tag[2], tag[3]); | 546 feature.tag = HB_TAG(tag[0], tag[1], tag[2], tag[3]); |
| 530 feature.value = settings->at(i).value(); | 547 feature.value = settings->at(i).value(); |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 point.x() + fromX, point.x() + toX, | 1133 point.x() + fromX, point.x() + toX, |
| 1117 point.y(), height); | 1134 point.y(), height); |
| 1118 } | 1135 } |
| 1119 | 1136 |
| 1120 return Font::pixelSnappedSelectionRect( | 1137 return Font::pixelSnappedSelectionRect( |
| 1121 point.x() + toX, point.x() + fromX, | 1138 point.x() + toX, point.x() + fromX, |
| 1122 point.y(), height); | 1139 point.y(), height); |
| 1123 } | 1140 } |
| 1124 | 1141 |
| 1125 } // namespace WebCore | 1142 } // namespace WebCore |
| OLD | NEW |