Draw: optional glyph index in GlyphInfo

git-svn-id: svn://ultimatepp.org/upp/trunk@5619 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2012-12-02 19:16:59 +00:00
parent be437777c6
commit ebdf617d98
2 changed files with 2 additions and 0 deletions

View file

@ -194,6 +194,7 @@ GlyphInfo GetGlyphInfoSys(Font font, int chr)
gi.width = TRUNC(ROUND(face->glyph->advance.x));
gi.lspc = TRUNC(left);
gi.rspc = gi.width - width - gi.lspc;
gi.glyphi = glyph_index;
}
}
}

View file

@ -36,6 +36,7 @@ struct GlyphInfo {
int16 width;
int16 lspc;
int16 rspc;
word glyphi; // optional, not available in Win32
bool IsNormal() const { return (word)width != 0x8000; }
bool IsComposed() const { return !IsNormal() && (lspc == -1 || lspc == -11); }