[cid, type1, type42] Clean up units_per_EM calculations.
* src/cid/cidload.c (cid_parse_font_matrix): Updated. * src/type1/t1load.c (t1_parse_font_matrix): Updated. * src/type42/t42parse.c (t42_parse_font_matrix): Updated.
This commit is contained in:
parent
72e976d415
commit
79180ad049
@ -1,3 +1,12 @@
|
||||
2012-11-27 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||
|
||||
[cid, type1, type42] Clean up units_per_EM calculations.
|
||||
|
||||
* src/cid/cidload.c (cid_parse_font_matrix): Updated.
|
||||
* src/type1/t1load.c (t1_parse_font_matrix): Updated.
|
||||
* src/type42/t42parse.c (t42_parse_font_matrix): Updated.
|
||||
|
||||
|
||||
2012-11-27 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||
|
||||
[ftstroke] Minor improvement.
|
||||
|
@ -168,11 +168,11 @@
|
||||
|
||||
temp_scale = FT_ABS( temp[3] );
|
||||
|
||||
/* Set units per EM based on FontMatrix values. We set the value to */
|
||||
/* `1000/temp_scale', because temp_scale was already multiplied by */
|
||||
/* 1000 (in `t1_tofixed', from psobjs.c). */
|
||||
root->units_per_EM = (FT_UShort)( FT_DivFix( 0x10000L,
|
||||
FT_DivFix( temp_scale, 1000 ) ) );
|
||||
/* Set Units per EM based on FontMatrix values. We set the value to */
|
||||
/* 1000 / temp_scale, because temp_scale was already multiplied by */
|
||||
/* 1000 (in t1_tofixed, from psobjs.c). */
|
||||
|
||||
root->units_per_EM = (FT_UShort)FT_DivFix( 1000, temp_scale );
|
||||
|
||||
/* we need to scale the values by 1.0/temp[3] */
|
||||
if ( temp_scale != 0x10000L )
|
||||
|
@ -1131,8 +1131,7 @@
|
||||
/* 1000 / temp_scale, because temp_scale was already multiplied by */
|
||||
/* 1000 (in t1_tofixed, from psobjs.c). */
|
||||
|
||||
root->units_per_EM = (FT_UShort)( FT_DivFix( 1000 * 0x10000L,
|
||||
temp_scale ) >> 16 );
|
||||
root->units_per_EM = (FT_UShort)FT_DivFix( 1000, temp_scale );
|
||||
|
||||
/* we need to scale the values by 1.0/temp_scale */
|
||||
if ( temp_scale != 0x10000L )
|
||||
|
@ -265,8 +265,7 @@
|
||||
/* 1000 / temp_scale, because temp_scale was already multiplied by */
|
||||
/* 1000 (in t1_tofixed, from psobjs.c). */
|
||||
|
||||
root->units_per_EM = (FT_UShort)( FT_DivFix( 1000 * 0x10000L,
|
||||
temp_scale ) >> 16 );
|
||||
root->units_per_EM = (FT_UShort)FT_DivFix( 1000, temp_scale );
|
||||
|
||||
/* we need to scale the values by 1.0/temp_scale */
|
||||
if ( temp_scale != 0x10000L )
|
||||
|
Loading…
Reference in New Issue
Block a user