| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 { | 171 { |
| 172 return { HB_TAG(c1, c2, c3, c4), value, 0 /* start */, static_cast<unsigned>
(-1) /* end */ }; | 172 return { HB_TAG(c1, c2, c3, c4), value, 0 /* start */, static_cast<unsigned>
(-1) /* end */ }; |
| 173 } | 173 } |
| 174 | 174 |
| 175 void HarfBuzzShaper::setFontFeatures() | 175 void HarfBuzzShaper::setFontFeatures() |
| 176 { | 176 { |
| 177 const FontDescription& description = m_font->fontDescription(); | 177 const FontDescription& description = m_font->fontDescription(); |
| 178 | 178 |
| 179 static hb_feature_t noKern = createFeature('k', 'e', 'r', 'n'); | 179 static hb_feature_t noKern = createFeature('k', 'e', 'r', 'n'); |
| 180 static hb_feature_t noVkrn = createFeature('v', 'k', 'r', 'n'); | 180 static hb_feature_t noVkrn = createFeature('v', 'k', 'r', 'n'); |
| 181 switch (description.kerning()) { | 181 switch (description.getKerning()) { |
| 182 case FontDescription::NormalKerning: | 182 case FontDescription::NormalKerning: |
| 183 // kern/vkrn are enabled by default | 183 // kern/vkrn are enabled by default |
| 184 break; | 184 break; |
| 185 case FontDescription::NoneKerning: | 185 case FontDescription::NoneKerning: |
| 186 m_features.append(description.isVerticalAnyUpright() ? noVkrn : noKern); | 186 m_features.append(description.isVerticalAnyUpright() ? noVkrn : noKern); |
| 187 break; | 187 break; |
| 188 case FontDescription::AutoKerning: | 188 case FontDescription::AutoKerning: |
| 189 break; | 189 break; |
| 190 } | 190 } |
| 191 | 191 |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 } | 797 } |
| 798 | 798 |
| 799 // Don't need to check m_textRun.allowsTrailingExpansion() since it's covere
d by !m_expansionOpportunityCount above | 799 // Don't need to check m_textRun.allowsTrailingExpansion() since it's covere
d by !m_expansionOpportunityCount above |
| 800 spacing += nextExpansionPerOpportunity(); | 800 spacing += nextExpansionPerOpportunity(); |
| 801 m_isAfterExpansion = true; | 801 m_isAfterExpansion = true; |
| 802 return spacing; | 802 return spacing; |
| 803 } | 803 } |
| 804 | 804 |
| 805 | 805 |
| 806 } // namespace blink | 806 } // namespace blink |
| OLD | NEW |