| 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 if (!face) { | 306 if (!face) { |
| 307 DLOG(ERROR) << "Could not create HarfBuzzFace from FontPlatformData."; | 307 DLOG(ERROR) << "Could not create HarfBuzzFace from FontPlatformData."; |
| 308 return false; | 308 return false; |
| 309 } | 309 } |
| 310 | 310 |
| 311 hb_buffer_set_language(harfBuzzBuffer, language); | 311 hb_buffer_set_language(harfBuzzBuffer, language); |
| 312 hb_buffer_set_script(harfBuzzBuffer, ICUScriptToHBScript(currentRunScript)); | 312 hb_buffer_set_script(harfBuzzBuffer, ICUScriptToHBScript(currentRunScript)); |
| 313 hb_buffer_set_direction(harfBuzzBuffer, TextDirectionToHBDirection(m_textRun
.direction(), | 313 hb_buffer_set_direction(harfBuzzBuffer, TextDirectionToHBDirection(m_textRun
.direction(), |
| 314 m_font->getFontDescription().orientation(), currentFont)); | 314 m_font->getFontDescription().orientation(), currentFont)); |
| 315 | 315 |
| 316 HarfBuzzScopedPtr<hb_font_t> harfBuzzFont(face->createFont(currentFontRangeS
et), hb_font_destroy); | 316 HarfBuzzScopedPtr<hb_font_t> harfBuzzFont(face->createFont(currentFont->size
(), currentFont->style(), currentFontRangeSet), hb_font_destroy); |
| 317 hb_shape(harfBuzzFont.get(), harfBuzzBuffer, m_features.isEmpty() ? 0 : m_fe
atures.data(), m_features.size()); | 317 hb_shape(harfBuzzFont.get(), harfBuzzBuffer, m_features.isEmpty() ? 0 : m_fe
atures.data(), m_features.size()); |
| 318 | 318 |
| 319 return true; | 319 return true; |
| 320 } | 320 } |
| 321 | 321 |
| 322 bool HarfBuzzShaper::extractShapeResults(hb_buffer_t* harfBuzzBuffer, | 322 bool HarfBuzzShaper::extractShapeResults(hb_buffer_t* harfBuzzBuffer, |
| 323 ShapeResult* shapeResult, | 323 ShapeResult* shapeResult, |
| 324 bool& fontCycleQueued, const HolesQueueItem& currentQueueItem, | 324 bool& fontCycleQueued, const HolesQueueItem& currentQueueItem, |
| 325 const SimpleFontData* currentFont, | 325 const SimpleFontData* currentFont, |
| 326 UScriptCode currentRunScript, | 326 UScriptCode currentRunScript, |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 result->m_width = run->m_width; | 680 result->m_width = run->m_width; |
| 681 result->m_numGlyphs = count; | 681 result->m_numGlyphs = count; |
| 682 ASSERT(result->m_numGlyphs == count); // no overflow | 682 ASSERT(result->m_numGlyphs == count); // no overflow |
| 683 result->m_hasVerticalOffsets = fontData->platformData().isVerticalAnyUpright
(); | 683 result->m_hasVerticalOffsets = fontData->platformData().isVerticalAnyUpright
(); |
| 684 result->m_runs.append(run.release()); | 684 result->m_runs.append(run.release()); |
| 685 return result.release(); | 685 return result.release(); |
| 686 } | 686 } |
| 687 | 687 |
| 688 | 688 |
| 689 } // namespace blink | 689 } // namespace blink |
| OLD | NEW |