* src/cff/cffobjs.c (cff_face_init), src/cid/cidobjs.c

(cid_face_init), src/pfr/pfrobjs.c (pfr_face_init), src/type1/t1objs.c
(T1_Face_Init): Set face->height to
MAX(1.2 * units_per_EM, ascender - descender).
This commit is contained in:
Wu, Chia-I (吳佳一) 2006-01-31 10:29:44 +00:00
parent 98d802b83a
commit 5d146851df
5 changed files with 26 additions and 11 deletions

View File

@ -1,3 +1,10 @@
2006-01-31 Chia-I Wu <b90201047@ntu.edu.tw>
* src/cff/cffobjs.c (cff_face_init), src/cid/cidobjs.c
(cid_face_init), src/pfr/pfrobjs.c (pfr_face_init), src/type1/t1objs.c
(T1_Face_Init): Set face->height to
MAX(1.2 * units_per_EM, ascender - descender).
2006-01-31 Chia-I Wu <b90201047@ntu.edu.tw>
* include/freetype/internal/t1types.h (AFM_FontInfo),

View File

@ -461,16 +461,18 @@
cffface->bbox.xMax = ( dict->font_bbox.xMax + 0xFFFFU ) >> 16;
cffface->bbox.yMax = ( dict->font_bbox.yMax + 0xFFFFU ) >> 16;
cffface->ascender = (FT_Short)( cffface->bbox.yMax );
cffface->descender = (FT_Short)( cffface->bbox.yMin );
cffface->height = (FT_Short)(
( ( cffface->ascender - cffface->descender ) * 12 ) / 10 );
if ( !dict->units_per_em )
dict->units_per_em = 1000;
cffface->units_per_EM = dict->units_per_em;
cffface->ascender = (FT_Short)( cffface->bbox.yMax );
cffface->descender = (FT_Short)( cffface->bbox.yMin );
cffface->height = (FT_Short)( ( cffface->units_per_EM * 12 ) / 10 );
if ( cffface->height < cffface->ascender - cffface->descender )
cffface->height = cffface->ascender - cffface->descender;
cffface->underline_position =
(FT_Short)( dict->underline_position >> 16 );
cffface->underline_thickness =

View File

@ -422,8 +422,10 @@
cidface->ascender = (FT_Short)( cidface->bbox.yMax );
cidface->descender = (FT_Short)( cidface->bbox.yMin );
cidface->height = (FT_Short)(
( ( cidface->ascender - cidface->descender ) * 12 ) / 10 );
cidface->height = (FT_Short)( ( cidface->units_per_EM * 12 ) / 10 );
if ( cidface->height < cidface->ascender - cidface->descender )
cidface->height = cidface->ascender - cidface->descender;
cidface->underline_position = (FT_Short)info->underline_position;
cidface->underline_thickness = (FT_Short)info->underline_thickness;

View File

@ -165,8 +165,10 @@
pfrface->units_per_EM = (FT_UShort)phy_font->outline_resolution;
pfrface->ascender = (FT_Short) phy_font->bbox.yMax;
pfrface->descender = (FT_Short) phy_font->bbox.yMin;
pfrface->height = (FT_Short)(
( ( pfrface->ascender - pfrface->descender ) * 12 ) / 10 );
pfrface->height = (FT_Short)( ( pfrface->units_per_EM * 12 ) / 10 );
if ( pfrface->height < pfrface->ascender - pfrface->descender )
pfrface->height = pfrface->ascender - pfrface->descender;
if ( phy_font->num_strikes > 0 )
{

View File

@ -414,8 +414,10 @@
root->ascender = (FT_Short)( root->bbox.yMax );
root->descender = (FT_Short)( root->bbox.yMin );
root->height = (FT_Short)(
( ( root->ascender - root->descender ) * 12 ) / 10 );
root->height = (FT_Short)( ( root->units_per_EM * 12 ) / 10 );
if ( root->height < root->ascender - root->descender )
root->height = root->ascender - root->descender;
/* now compute the maximum advance width */
root->max_advance_width =