Size textArea(100.f, 60.f);
Size layoutSize;
+ const Vector<FontDescriptionRun> fontDescriptions;
+ const LayoutOptions options;
CreateTextModel( data.text,
textArea,
+ fontDescriptions,
+ options,
layoutSize,
logicalModel,
visualModel );
- // 2) Clear the model.
Vector<GlyphIndex>& charactersToGlyph = visualModel->mCharactersToGlyph;
Vector<Length>& glyphsPerCharacter = visualModel->mGlyphsPerCharacter;
+ // 2) Clear the model.
+
+ GlyphIndex startGlyphIndex = 0u;
if( 0u != charactersToGlyph.Count() )
{
// The number of glyphs to be removed.
const Length numberOfGlyphs = charactersToGlyph[data.startIndex + data.numberOfCharacters - 1u] + glyphsPerCharacter[data.startIndex + data.numberOfCharacters - 1u] - charactersToGlyph[data.startIndex];
+ startGlyphIndex = charactersToGlyph[data.startIndex];
charactersToGlyph.Erase( charactersToGlyph.Begin() + data.startIndex,
charactersToGlyph.Begin() + data.startIndex + data.numberOfCharacters );
// 3) Call the CreateGlyphsPerCharacterTable() function
visualModel->CreateGlyphsPerCharacterTable( data.startIndex,
+ startGlyphIndex,
data.numberOfCharacters );
// 4) Compare the results.
Size textArea(100.f, 60.f);
Size layoutSize;
+ const Vector<FontDescriptionRun> fontDescriptions;
+ const LayoutOptions options;
CreateTextModel( data.text,
textArea,
+ fontDescriptions,
+ options,
layoutSize,
logicalModel,
visualModel );
- // 2) Clear the model.
Vector<GlyphIndex>& charactersToGlyph = visualModel->mCharactersToGlyph;
Vector<Length>& glyphsPerCharacter = visualModel->mGlyphsPerCharacter;
+ // 2) Clear the model.
+
+ GlyphIndex startGlyphIndex = 0u;
if( 0u != charactersToGlyph.Count() )
{
// The number of glyphs to be removed.
const Length numberOfGlyphs = charactersToGlyph[data.startIndex + data.numberOfCharacters - 1u] + glyphsPerCharacter[data.startIndex + data.numberOfCharacters - 1u] - charactersToGlyph[data.startIndex];
+ startGlyphIndex = charactersToGlyph[data.startIndex];
charactersToGlyph.Erase( charactersToGlyph.Begin() + data.startIndex,
charactersToGlyph.Begin() + data.startIndex + data.numberOfCharacters );
// 3) Call the CreateCharacterToGlyphTable() function
visualModel->CreateCharacterToGlyphTable( data.startIndex,
+ startGlyphIndex,
data.numberOfCharacters );
// 4) Compare the results.