* Added clarifying comment.
* When the consumer does not want to consume a glyph, make sure the advance values are being reset before breaking out of the loop. These are used one more time after the loop. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28083 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -155,6 +155,8 @@ GlyphLayoutEngine::LayoutGlyphs(GlyphConsumer& consumer,
|
||||
continue;
|
||||
}
|
||||
|
||||
// TODO: Currently disabled, because it works much too slow (doesn't seem
|
||||
// to be properly cached in FreeType.)
|
||||
// if (kerning)
|
||||
// entry->GetKerning(lastCharCode, charCode, &advanceX, &advanceY);
|
||||
|
||||
@@ -164,10 +166,13 @@ GlyphLayoutEngine::LayoutGlyphs(GlyphConsumer& consumer,
|
||||
if (delta)
|
||||
x += IsWhiteSpace(charCode) ? delta->space : delta->nonspace;
|
||||
|
||||
if (!consumer.ConsumeGlyph(index, charCode, glyph, entry, x, y))
|
||||
if (!consumer.ConsumeGlyph(index, charCode, glyph, entry, x, y)) {
|
||||
advanceX = 0;
|
||||
advanceY = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
// increment pen position
|
||||
// get next increment for pen position
|
||||
advanceX = glyph->advance_x;
|
||||
advanceY = glyph->advance_y;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user