* src/winfonts/winfnt.c (FNT_Face_Init): Set x_ppem and y_ppem

based on pixel_width and pixel_height.
(FNT_Size_Set_Pixels): Updated.
This commit is contained in:
Werner Lemberg 2004-06-15 14:13:10 +00:00
parent d9d73b26b9
commit 8fbec7440c
3 changed files with 16 additions and 14 deletions

View File

@ -1,3 +1,9 @@
2004-06-14 Huw D M Davies <h.davies1@physics.ox.ac.uk>
* src/winfonts/winfnt.c (FNT_Face_Init): Set x_ppem and y_ppem
based on pixel_width and pixel_height.
(FNT_Size_Set_Pixels): Updated.
2004-06-14 Werner Lemberg <wl@gnu.org>
* src/lzw/zopen.c: Comment out inclusion of signal.h and unistd.h.
@ -658,8 +664,8 @@
Handle broken FNT files which don't have a trailing NULL byte
in the face name string.
* src/winfnt/winfnt.h (FNT_FontRec): New member `family_name'.
* src/winfnt/winfnt.c (fnt_font_done): Free font->family_name.
* src/winfonts/winfnt.h (FNT_FontRec): New member `family_name'.
* src/winfonts/winfnt.c (fnt_font_done): Free font->family_name.
(FNT_Face_Init): Append a final zero byte to the font face name.
2004-03-30 Werner Lemberg <wl@gnu.org>
@ -7449,7 +7455,7 @@
(tt_driver_class): Add it.
* src/type1/t1driver.c (Get_Next_Char): New function.
(t1_driver_class): Add it.
* src/winfnt/winfnt.c (FNT_Get_Next_Char): New function.
* src/winfonts/winfnt.c (FNT_Get_Next_Char): New function.
(winfnt_driver_class): Add it.
* src/pcf/pcfread.c (pcf_load_font): For now, report Unicode for

View File

@ -271,10 +271,10 @@ FT_BEGIN_HEADER
/* where `size' is in points. */
/* */
/* Windows FNT: */
/* The `size', `x_ppem', and `y_ppem' parameters are not reliable: */
/* There exist fonts (e.g. app850.fon) which have a wrong size for */
/* some subfonts; since FNT files don't contain ppem but dpi values */
/* the computed x_ppem and y_ppem numbers are thus wrong also. */
/* The `size' parameter is not reliable: There exist fonts (e.g., */
/* app850.fon) which have a wrong size for some subfonts; x_ppem */
/* and y_ppem are thus set equal to pixel width and height given in */
/* in the Windows FNT header. */
/* */
/* TrueType embedded bitmaps: */
/* `size', `width', and `height' values are not contained in the */

View File

@ -466,12 +466,8 @@
bsize->height = (FT_Short)(
font->header.pixel_height + font->header.external_leading );
bsize->size = font->header.nominal_point_size << 6;
bsize->x_ppem =
(FT_Pos)( ( font->header.horizontal_resolution * bsize->size + 36 )
/ 72 );
bsize->y_ppem =
(FT_Pos)( ( font->header.vertical_resolution* bsize->size + 36 )
/ 72 );
bsize->x_ppem = font->header.pixel_width << 6;
bsize->y_ppem = font->header.pixel_height << 6;
}
{
@ -553,7 +549,7 @@
FT_Face root = FT_FACE( face );
if ( size->metrics.y_ppem == root->available_sizes->height )
if ( size->metrics.y_ppem == root->available_sizes->y_ppem >> 6 )
{
FNT_Font font = face->font;