| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 | 288 |
| 289 hb_buffer_set_language(harfBuzzBuffer, language); | 289 hb_buffer_set_language(harfBuzzBuffer, language); |
| 290 hb_buffer_set_script(harfBuzzBuffer, ICUScriptToHBScript(currentRunScript)); | 290 hb_buffer_set_script(harfBuzzBuffer, ICUScriptToHBScript(currentRunScript)); |
| 291 hb_buffer_set_direction(harfBuzzBuffer, TextDirectionToHBDirection(m_textRun
.direction(), | 291 hb_buffer_set_direction(harfBuzzBuffer, TextDirectionToHBDirection(m_textRun
.direction(), |
| 292 m_font->getFontDescription().orientation(), currentFont)); | 292 m_font->getFontDescription().orientation(), currentFont)); |
| 293 | 293 |
| 294 addToHarfBuzzBufferInternal(harfBuzzBuffer, | 294 addToHarfBuzzBufferInternal(harfBuzzBuffer, |
| 295 m_font->getFontDescription(), m_normalizedBuffer.get(), m_normalizedBuff
erLength, | 295 m_font->getFontDescription(), m_normalizedBuffer.get(), m_normalizedBuff
erLength, |
| 296 startIndex, numCharacters); | 296 startIndex, numCharacters); |
| 297 | 297 |
| 298 hb_font_t* hbFont = face->getScaledFont(currentFontRangeSet); | 298 HarfBuzzScopedPtr<hb_font_t> harfBuzzFont(face->createFont(currentFontRangeS
et), hb_font_destroy); |
| 299 hb_shape(hbFont, harfBuzzBuffer, m_features.isEmpty() ? 0 : m_features.data(
), m_features.size()); | 299 hb_shape(harfBuzzFont.get(), harfBuzzBuffer, m_features.isEmpty() ? 0 : m_fe
atures.data(), m_features.size()); |
| 300 | 300 |
| 301 return true; | 301 return true; |
| 302 } | 302 } |
| 303 | 303 |
| 304 bool HarfBuzzShaper::extractShapeResults(hb_buffer_t* harfBuzzBuffer, | 304 bool HarfBuzzShaper::extractShapeResults(hb_buffer_t* harfBuzzBuffer, |
| 305 ShapeResult* shapeResult, | 305 ShapeResult* shapeResult, |
| 306 bool& fontCycleQueued, const HolesQueueItem& currentQueueItem, | 306 bool& fontCycleQueued, const HolesQueueItem& currentQueueItem, |
| 307 const SimpleFontData* currentFont, | 307 const SimpleFontData* currentFont, |
| 308 UScriptCode currentRunScript, | 308 UScriptCode currentRunScript, |
| 309 bool isLastResort) | 309 bool isLastResort) |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 result->m_width = run->m_width; | 679 result->m_width = run->m_width; |
| 680 result->m_numGlyphs = count; | 680 result->m_numGlyphs = count; |
| 681 ASSERT(result->m_numGlyphs == count); // no overflow | 681 ASSERT(result->m_numGlyphs == count); // no overflow |
| 682 result->m_hasVerticalOffsets = fontData->platformData().isVerticalAnyUpright
(); | 682 result->m_hasVerticalOffsets = fontData->platformData().isVerticalAnyUpright
(); |
| 683 result->m_runs.append(run.release()); | 683 result->m_runs.append(run.release()); |
| 684 return result.release(); | 684 return result.release(); |
| 685 } | 685 } |
| 686 | 686 |
| 687 | 687 |
| 688 } // namespace blink | 688 } // namespace blink |
| OLD | NEW |