mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Draw: Win32 support for Font::IsScript, IsSerif
git-svn-id: svn://ultimatepp.org/upp/trunk@12208 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
cc6ccbcc8b
commit
12bb53705e
3 changed files with 13 additions and 1 deletions
|
|
@ -202,7 +202,7 @@ GlyphInfo GetGlyphInfoSys(Font font, int chr)
|
|||
FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT) == 0) {
|
||||
FT_Glyph_Metrics& m = face->glyph->metrics;
|
||||
int left = FLOOR(m.horiBearingX);
|
||||
int width = TRUNC(CEIL(m.horiBearingX + m.width) - left);
|
||||
int width = TRUNC(CEIL(m.horiBearingX + m.width) - left);
|
||||
gi.width = TRUNC(ROUND(face->glyph->advance.x));
|
||||
gi.lspc = TRUNC(left);
|
||||
gi.rspc = gi.width - width - gi.lspc;
|
||||
|
|
|
|||
|
|
@ -173,6 +173,10 @@ static int CALLBACK Win32_AddFace(const LOGFONT *logfont, const TEXTMETRIC *, dw
|
|||
f.info = Font::SCALEABLE;
|
||||
if((logfont->lfPitchAndFamily & 3) == FIXED_PITCH)
|
||||
f.info |= Font::FIXEDPITCH;
|
||||
if(logfont->lfPitchAndFamily & FF_ROMAN)
|
||||
f.info |= Font::SERIFSTYLE;
|
||||
if(logfont->lfPitchAndFamily & FF_SCRIPT)
|
||||
f.info |= Font::SCRIPTSTYLE;
|
||||
if(!(type & TRUETYPE_FONTTYPE))
|
||||
f.info &= ~Font::SCALEABLE;
|
||||
if(logfont->lfCharSet == SYMBOL_CHARSET || logfont->lfCharSet == OEM_CHARSET)
|
||||
|
|
|
|||
|
|
@ -337,6 +337,14 @@ there is a space inside the cell not used for glyph.&]
|
|||
[s2;%% True if font is mono`-spaced.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Font`:`:IsSerif`(`)const: [@(0.0.255) bool]_[* IsSerif]()_[@(0.0.255) const]&]
|
||||
[s2;%% True if font has serif style.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Upp`:`:Font`:`:IsScript`(`)const: [@(0.0.255) bool]_[* IsScript]()_[@(0.0.255) const]&]
|
||||
[s2;%% True if font has script style.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:Font`:`:IsScaleable`(`)const: [@(0.0.255) bool]_[* IsScaleable]()_[@(0.0.255) const]&]
|
||||
[s2;%% True if font is freely scaleable.&]
|
||||
[s3; &]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue