freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] ewaldhew-wip f9b6a2d 46/47: fixes for render


From: Hew Yih Shiuan Ewald
Subject: [freetype2] ewaldhew-wip f9b6a2d 46/47: fixes for render
Date: Thu, 6 Jul 2017 04:49:40 -0400 (EDT)

branch: ewaldhew-wip
commit f9b6a2d358d707841c15db5b328e958aebbdca85
Author: Ewald Hew <address@hidden>
Commit: Ewald Hew <address@hidden>

    fixes for render
    
    . Type 1 advance widths calculation passes null pointer for decoder
    glyphslot etc, causes segfault in cf2_decoder_parse_charstrings
    
    . glyph->hint property not set, causes glyph transform to fall back to
    default value
---
 src/type1/t1gload.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c
index da22da5..2e27ca0 100644
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -150,7 +150,8 @@
     {
 #ifdef T1_CONFIG_OPTION_OLD_ENGINE
       /* choose which renderer to use */
-      if ( driver->hinting_engine == FT_T1_HINTING_FREETYPE )
+      if ( driver->hinting_engine == FT_T1_HINTING_FREETYPE ||
+           decoder->builder.metrics_only )
         error = decoder_funcs->parse_charstrings_old( decoder,
                                                       
(FT_Byte*)char_string->pointer,
                                                       
(FT_UInt)char_string->length );
@@ -455,6 +456,7 @@
     hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE   ) == 0 &&
                        ( load_flags & FT_LOAD_NO_HINTING ) == 0 );
 
+    glyph->hint     = hinting;
     t1glyph->format = FT_GLYPH_FORMAT_OUTLINE;
 
     error = decoder_funcs->init( &decoder,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]