[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] PCF problem
From: |
Werner LEMBERG |
Subject: |
Re: [Devel] PCF problem |
Date: |
Mon, 07 Jul 2003 08:47:51 +0200 (CEST) |
> With the PCF driver there are problems when the font file does not
> contain the PIXEL_SIZE property which is used for the height.
>
> ...
>
> if ( bsize->height == 0 )
> bsize->height =
> (FT_Short)( ( bsize->size * bsize->y_ppem + 2048 ) / 64 / 64 );
>
> For example I have a PCF font here with
>
> no PIXEL_SIZE
> POINT_SIZE 170 (= 17pt)
> RESOLUTION_Y 78
>
> with above code this results in
>
> size 1084 (= point size 16.9x)
> y_ppem 1174 (= 18.x ppem)
> height 311 ???
>
> Is this a problem with the font or the formula?
The formula is bad. It must be
bsize->height = (FT_Short)( ( bsize->y_ppem + 32 ) / 64 );
This makes 18 pixels for your font which looks reasonable.
I've fixed this now. Thanks for the report.
Werner