| 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 if (!face) { | 340 if (!face) { |
| 341 DLOG(ERROR) << "Could not create HarfBuzzFace from FontPlatformData."; | 341 DLOG(ERROR) << "Could not create HarfBuzzFace from FontPlatformData."; |
| 342 return false; | 342 return false; |
| 343 } | 343 } |
| 344 | 344 |
| 345 hb_buffer_set_language(harfBuzzBuffer, language); | 345 hb_buffer_set_language(harfBuzzBuffer, language); |
| 346 hb_buffer_set_script(harfBuzzBuffer, ICUScriptToHBScript(currentRunScript)); | 346 hb_buffer_set_script(harfBuzzBuffer, ICUScriptToHBScript(currentRunScript)); |
| 347 hb_buffer_set_direction(harfBuzzBuffer, TextDirectionToHBDirection(m_textRun
.direction(), | 347 hb_buffer_set_direction(harfBuzzBuffer, TextDirectionToHBDirection(m_textRun
.direction(), |
| 348 m_font->getFontDescription().orientation(), currentFont)); | 348 m_font->getFontDescription().orientation(), currentFont)); |
| 349 | 349 |
| 350 hb_font_t* hbFont = face->getScaledFont(currentFontRangeSet); | 350 hb_font_t* hbFont = face->getScaledFont(std::move(currentFontRangeSet)); |
| 351 hb_shape(hbFont, harfBuzzBuffer, m_features.isEmpty() ? 0 : m_features.data(
), m_features.size()); | 351 hb_shape(hbFont, harfBuzzBuffer, m_features.isEmpty() ? 0 : m_features.data(
), m_features.size()); |
| 352 | 352 |
| 353 return true; | 353 return true; |
| 354 } | 354 } |
| 355 | 355 |
| 356 bool HarfBuzzShaper::extractShapeResults(hb_buffer_t* harfBuzzBuffer, | 356 bool HarfBuzzShaper::extractShapeResults(hb_buffer_t* harfBuzzBuffer, |
| 357 ShapeResult* shapeResult, | 357 ShapeResult* shapeResult, |
| 358 bool& fontCycleQueued, const HolesQueueItem& currentQueueItem, | 358 bool& fontCycleQueued, const HolesQueueItem& currentQueueItem, |
| 359 const SimpleFontData* currentFont, | 359 const SimpleFontData* currentFont, |
| 360 UScriptCode currentRunScript, | 360 UScriptCode currentRunScript, |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 result->m_width = run->m_width; | 699 result->m_width = run->m_width; |
| 700 result->m_numGlyphs = count; | 700 result->m_numGlyphs = count; |
| 701 ASSERT(result->m_numGlyphs == count); // no overflow | 701 ASSERT(result->m_numGlyphs == count); // no overflow |
| 702 result->m_hasVerticalOffsets = fontData->platformData().isVerticalAnyUpright
(); | 702 result->m_hasVerticalOffsets = fontData->platformData().isVerticalAnyUpright
(); |
| 703 result->m_runs.append(std::move(run)); | 703 result->m_runs.append(std::move(run)); |
| 704 return result.release(); | 704 return result.release(); |
| 705 } | 705 } |
| 706 | 706 |
| 707 | 707 |
| 708 } // namespace blink | 708 } // namespace blink |
| OLD | NEW |