forked from minhngoc25a/freetype2
[bdf, pcf] Minor optimization.
* src/pcf/pcfread.c (pcf_load_font): Do not call `FT_MulDiv` for a small job. * src/bdf/bdfdrivr.c (BDF_Face_Init): Ditto. * src/bdf/bdflib.c (_bdf_parse_glyphs): Fix a comment.
This commit is contained in:
parent
b4dddd8244
commit
90b14882ec
|
@ -487,7 +487,7 @@ THE SOFTWARE.
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* this is a heuristical value */
|
/* this is a heuristical value */
|
||||||
bsize->width = (FT_Short)FT_MulDiv( bsize->height, 2, 3 );
|
bsize->width = ( bsize->height * 2 + 1 ) / 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
prop = bdf_get_font_property( font, "POINT_SIZE" );
|
prop = bdf_get_font_property( font, "POINT_SIZE" );
|
||||||
|
|
|
@ -1615,7 +1615,7 @@
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Expect the DWIDTH (scalable width) field next. */
|
/* Expect the DWIDTH (device width) field next. */
|
||||||
if ( _bdf_strncmp( line, "DWIDTH", 6 ) == 0 )
|
if ( _bdf_strncmp( line, "DWIDTH", 6 ) == 0 )
|
||||||
{
|
{
|
||||||
error = _bdf_list_split( &p->list, " +", line, linelen );
|
error = _bdf_list_split( &p->list, " +", line, linelen );
|
||||||
|
|
|
@ -1612,7 +1612,7 @@ THE SOFTWARE.
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* this is a heuristical value */
|
/* this is a heuristical value */
|
||||||
bsize->width = (FT_Short)FT_MulDiv( bsize->height, 2, 3 );
|
bsize->width = ( bsize->height * 2 + 1 ) / 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
prop = pcf_find_property( face, "POINT_SIZE" );
|
prop = pcf_find_property( face, "POINT_SIZE" );
|
||||||
|
|
Loading…
Reference in New Issue