mirror of
https://gitlab.freedesktop.org/freetype/freetype.git
synced 2026-03-23 16:50:35 +01:00
[VARC] Set glyph metrics as well
This commit is contained in:
parent
7185bd81b3
commit
4875bb0937
1 changed files with 12 additions and 0 deletions
|
|
@ -2580,6 +2580,18 @@
|
|||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
FT_BBox bbox;
|
||||
|
||||
|
||||
FT_Outline_Get_CBox( &glyph->outline, &bbox );
|
||||
|
||||
glyph->metrics.horiBearingX = bbox.xMin;
|
||||
glyph->metrics.horiBearingY = bbox.yMax;
|
||||
glyph->metrics.width = SUB_LONG( bbox.xMax, bbox.xMin );
|
||||
glyph->metrics.height = SUB_LONG( bbox.yMax, bbox.yMin );
|
||||
}
|
||||
|
||||
if ( load_flags & FT_LOAD_NO_SCALE )
|
||||
{
|
||||
glyph->metrics.horiAdvance = (FT_Pos)advance_width * 64;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue