Commit 2293bb15c23e4e0ae3918f474ed567cf27153552

Wu, Chia-I (吳佳一) 2005-10-19T08:07:38

* src/truetype/ttgload.c (TT_Load_Glyph): Allow size->ttmetrics to be invalid when FT_LOAD_NO_SCALE is set.

diff --git a/ChangeLog b/ChangeLog
index 8fcf948..1a5e516 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,16 +1,21 @@
-2005-10-17  David Turner  <david@freetype.org>
-
-	* src/base/ftobjs.c (FT_Open_Face): Don't call FT_New_GlyphSlot and
-	FT_New_Size if we are opening a face with face_index < 0 (which is
-	only used for testing the format).
+2005-10-19  Chia-I Wu  <b90201047@ntu.edu.tw>
 
-	* src/gxvalid/gxvmort0.c (gxv_mort_subtable_type0_entry_validate):
-	Remove compiler warning.
+	* src/truetype/ttgload.c (TT_Load_Glyph): Allow size->ttmetrics to be
+	invalid when FT_LOAD_NO_SCALE is set.
+
+2005-10-17  David Turner  <david@freetype.org>
+
+	* src/base/ftobjs.c (FT_Open_Face): Don't call FT_New_GlyphSlot and
+	FT_New_Size if we are opening a face with face_index < 0 (which is
+	only used for testing the format).
+
+	* src/gxvalid/gxvmort0.c (gxv_mort_subtable_type0_entry_validate):
+	Remove compiler warning.
 
 2005-10-16  David Turner  <david@freetype.org>
 
-	* src/tools/apinames.c: Add new tool to extract public API function
-	names from header files.
+	* src/tools/apinames.c: Add new tool to extract public API function
+	names from header files.
 
 2005-10-05  Werner Lemberg  <wl@gnu.org>
 
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index d606cdb..68be2ab 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -2020,7 +2020,8 @@
 
 #endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
 
-    if ( !size->ttmetrics.valid )
+    /* if FT_LOAD_NO_SCALE is not set, ttmetirc must be valid */
+    if ( !( load_flags & FT_LOAD_NO_SCALE ) && !size->ttmetrics.valid )
       return TT_Err_Invalid_Size_Handle;
 
     if ( load_flags & FT_LOAD_SBITS_ONLY )
@@ -2061,7 +2062,7 @@
     /* This is _critical_ to get correct output for monochrome      */
     /* TrueType glyphs at all sizes using the bytecode interpreter. */
     /*                                                              */
-    if ( size->root.metrics.y_ppem < 24 )
+    if ( !( load_flags & FT_LOAD_NO_SCALE ) && size->root.metrics.y_ppem < 24 )
       glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION;
 
     return error;