| 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 | 334 |
| 335 hb_buffer_set_language(harfBuzzBuffer, language); | 335 hb_buffer_set_language(harfBuzzBuffer, language); |
| 336 hb_buffer_set_script(harfBuzzBuffer, ICUScriptToHBScript(currentRunScript)); | 336 hb_buffer_set_script(harfBuzzBuffer, ICUScriptToHBScript(currentRunScript)); |
| 337 hb_buffer_set_direction(harfBuzzBuffer, TextDirectionToHBDirection(m_textRun
.direction(), | 337 hb_buffer_set_direction(harfBuzzBuffer, TextDirectionToHBDirection(m_textRun
.direction(), |
| 338 m_font->fontDescription().orientation(), currentFont)); | 338 m_font->fontDescription().orientation(), currentFont)); |
| 339 | 339 |
| 340 addToHarfBuzzBufferInternal(harfBuzzBuffer, | 340 addToHarfBuzzBufferInternal(harfBuzzBuffer, |
| 341 m_font->fontDescription(), m_normalizedBuffer.get(), m_normalizedBufferL
ength, | 341 m_font->fontDescription(), m_normalizedBuffer.get(), m_normalizedBufferL
ength, |
| 342 startIndex, numCharacters); | 342 startIndex, numCharacters); |
| 343 | 343 |
| 344 HarfBuzzScopedPtr<hb_font_t> harfBuzzFont(face->createFont(currentFontRangeF
rom, currentFontRangeTo), hb_font_destroy); | 344 hb_font_t* hbFont = face->getScaledFont(currentFontRangeFrom, currentFontRan
geTo); |
| 345 hb_shape(harfBuzzFont.get(), harfBuzzBuffer, m_features.isEmpty() ? 0 : m_fe
atures.data(), m_features.size()); | 345 hb_shape(hbFont, harfBuzzBuffer, m_features.isEmpty() ? 0 : m_features.data(
), m_features.size()); |
| 346 | 346 |
| 347 return true; | 347 return true; |
| 348 } | 348 } |
| 349 | 349 |
| 350 bool HarfBuzzShaper::extractShapeResults(hb_buffer_t* harfBuzzBuffer, | 350 bool HarfBuzzShaper::extractShapeResults(hb_buffer_t* harfBuzzBuffer, |
| 351 ShapeResult* shapeResult, | 351 ShapeResult* shapeResult, |
| 352 bool& fontCycleQueued, const HolesQueueItem& currentQueueItem, | 352 bool& fontCycleQueued, const HolesQueueItem& currentQueueItem, |
| 353 const SimpleFontData* currentFont, | 353 const SimpleFontData* currentFont, |
| 354 UScriptCode currentRunScript, | 354 UScriptCode currentRunScript, |
| 355 bool isLastResort) | 355 bool isLastResort) |
| (...skipping 441 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 |