/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// There is no way to know the number of glyphs before shaping the text.
// To avoid reallocations it's reserved space for a slightly biger number of glyphs than the number of characters.
+ GlyphInfo glyphInfo;
+ glyphInfo.isItalicRequired = false;
+ glyphInfo.isBoldRequired = false;
+
const Length currentNumberOfGlyphs = glyphs.Count();
const Length numberOfGlyphsReserved = static_cast<Length>( numberOfCharacters * 1.3f );
- glyphs.Resize( currentNumberOfGlyphs + numberOfGlyphsReserved );
+ glyphs.Resize( currentNumberOfGlyphs + numberOfGlyphsReserved, glyphInfo );
glyphToCharacterMap.Resize( currentNumberOfGlyphs + numberOfGlyphsReserved );
// The actual number of glyphs.
currentFontId = fontRun.fontId;
currentScript = scriptRun.script;
+ const bool isItalicRequired = fontRun.isItalicRequired;
+ const bool isBoldRequired = fontRun.isBoldRequired;
// Get the min index to the last character of both runs.
CharacterIndex currentIndex = min( fontRun.characterRun.characterIndex + fontRun.characterRun.numberOfCharacters,
// Retrieve the glyphs and the glyph to character conversion map.
Vector<GlyphInfo> tmpGlyphs;
Vector<CharacterIndex> tmpGlyphToCharacterMap;
- tmpGlyphs.Resize( numberOfGlyphs );
+
+ GlyphInfo glyphInfo;
+ glyphInfo.isItalicRequired = isItalicRequired;
+ glyphInfo.isBoldRequired = isBoldRequired;
+
+ tmpGlyphs.Resize( numberOfGlyphs, glyphInfo );
tmpGlyphToCharacterMap.Resize( numberOfGlyphs );
shaping.GetGlyphs( tmpGlyphs.Begin(),
tmpGlyphToCharacterMap.Begin() );