summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2005-08-22 07:11:31 +0000
committerWerner Lemberg <wl@gnu.org>2005-08-22 07:11:31 +0000
commitd9710afa380ac7fab231fc9d942436874a6b69da (patch)
tree34628e0899c0d41d1a49ca9f7e1d6ee8dc33bf05
parent832f19b2a8ab49a100eeeef8811846d192844771 (diff)
downloadfreetype2-d9710afa380ac7fab231fc9d942436874a6b69da.tar.gz
* src/truetype/ttgload.c (TT_Load_Glyph): Only translate outline
to (0,0) if bit 1 of the `head' table isn't set. This improves rendering of buggy fonts.
-rw-r--r--ChangeLog23
-rw-r--r--docs/CHANGES4
-rw-r--r--src/truetype/ttgload.c5
3 files changed, 30 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 251a6f8a9..55ae88067 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-08-21 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c (TT_Load_Glyph): Only translate outline
+ to (0,0) if bit 1 of the `head' table isn't set. This improves
+ rendering of buggy fonts.
+
2005-08-20 Chia I Wu <b90201047@ntu.edu.tw>
* src/truetype/ttdriver.c (Load_Glyph): Don't check the validity of
@@ -235,3 +241,20 @@
2005-06-13 Werner Lemberg <wl@gnu.org>
* docs/release: Update.
+
+----------------------------------------------------------------------------
+
+Copyright 2005 by
+David Turner, Robert Wilhelm, and Werner Lemberg.
+
+This file is part of the FreeType project, and may only be used, modified,
+and distributed under the terms of the FreeType project license,
+LICENSE.TXT. By continuing to use, modify, or distribute this file you
+indicate that you have read the license and understand and accept it
+fully.
+
+
+Local Variables:
+version-control: never
+coding: latin-1
+End:
diff --git a/docs/CHANGES b/docs/CHANGES
index ea82b6fa4..8e6cb7349 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -27,6 +27,10 @@ LATEST CHANGES BETWEEN 2.2.0 and 2.1.10
- The demo programs `ftview' and `ftstring' have been rewritten
for better readability.
+ - FreeType now honours bit 1 in the `head' table of TrueType fonts
+ (meaning `left sidebearing point at x=0'). This helps with
+ some buggy fonts.
+
======================================================================
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 5a807b3e7..68a9c7402 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -2057,8 +2057,9 @@
glyph->outline = loader.gloader->base.outline;
glyph->outline.flags &= ~FT_OUTLINE_SINGLE_PASS;
- /* translate array so that (0,0) is the glyph's origin */
- if ( loader.pp1.x )
+ /* In case bit 1 of the `flags' field in the `head' table isn't */
+ /* set, translate array so that (0,0) is the glyph's origin. */
+ if ( ( face->header.Flags & 2 ) == 0 && loader.pp1.x )
FT_Outline_Translate( &glyph->outline, -loader.pp1.x, 0 );
}