summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2004-06-15 14:13:10 +0000
committerWerner Lemberg <wl@gnu.org>2004-06-15 14:13:10 +0000
commit79786fba337b16cb5411fd2e4361c246f4d66921 (patch)
treec1956479228c11ca7b938d46f723bfaf0e5942f5
parentf9b44e30b5feedfb29b9ab85a9128f962203eff3 (diff)
downloadfreetype2-79786fba337b16cb5411fd2e4361c246f4d66921.tar.gz
* 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.
-rw-r--r--ChangeLog12
-rw-r--r--include/freetype/freetype.h8
-rw-r--r--src/winfonts/winfnt.c10
3 files changed, 16 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 6931201d4..5dbb15383 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index a77e00492..80a3b6302 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -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 */
diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c
index 66ceef7ce..92174aedb 100644
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -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;