mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-10 03:54:54 -06:00
*Draw: fixed CJK glyph issues
git-svn-id: svn://ultimatepp.org/upp/trunk@3417 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
f8fc27de41
commit
2fbbc9989d
3 changed files with 46 additions and 32 deletions
|
|
@ -85,6 +85,19 @@ void Draw::DrawText(int x, int y, int angle, const wchar *text, Font font,
|
|||
}
|
||||
GlyphMetrics(gi, font, chr);
|
||||
}
|
||||
else {
|
||||
Font fnt = Arial(font.GetHeight());
|
||||
wchar chr = 0x25a1;
|
||||
gi = GetGlyphInfo(fnt, chr);
|
||||
if(!gi.IsNormal()) {
|
||||
chr = ' ';
|
||||
gi = GetGlyphInfo(fnt, chr);
|
||||
}
|
||||
if(angle)
|
||||
DrawTextOp(int(x + cosa * d), int(y - sina * d), angle, &chr, fnt, ink, 1, NULL);
|
||||
else
|
||||
DrawTextOp(x + d, y, 0, &chr, fnt, ink, 1, NULL);
|
||||
}
|
||||
d += dx ? *dx++ : gi.width;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue