freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] parthw-cleaned 5e0acc4 2/2: [pk] Fix metric extraction funct


From: Parth Wazurkar
Subject: [freetype2] parthw-cleaned 5e0acc4 2/2: [pk] Fix metric extraction functions.
Date: Wed, 1 Aug 2018 15:45:39 -0400 (EDT)

branch: parthw-cleaned
commit 5e0acc45bf5a84c533d5f1910e93e49cde43328e
Author: Parth Wazurkar <address@hidden>
Commit: Parth Wazurkar <address@hidden>

    [pk] Fix metric extraction functions.
    
    * src/pk/pklib.c(pk_load_font): Change `READ_UINT4' function
    to `READ_INT4' to *correctly* extract information in font
    file's header.
    
    * Now pk driver displays glyphs in ftview.
---
 src/pk/pklib.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/pk/pklib.c b/src/pk/pklib.c
index 09a62e5..c4fcfbd 100644
--- a/src/pk/pklib.c
+++ b/src/pk/pklib.c
@@ -320,10 +320,10 @@ unsigned char   bits_table[] = {
     k = READ_UINT1( stream );
     if ( FT_STREAM_SKIP( k ) )
       goto Exit;
-    ds        = READ_UINT4( stream );
-    check_sum = READ_UINT4( stream );
-    hppp      = READ_UINT4( stream );
-    vppp      = READ_UINT4( stream );
+    ds        = READ_INT4( stream );
+    check_sum = READ_INT4( stream );
+    hppp      = READ_INT4( stream );
+    vppp      = READ_INT4( stream );
 
     /* gptr = ftell(fp); */
     gptr = stream->pos;
@@ -510,6 +510,7 @@ unsigned char   bits_table[] = {
           if (pk_read_14(stream, dny_f, bw, rs, &(go->bm_table[index]), cc) < 
0)
           {
             /* vf_error = VF_ERR_ILL_FONT_FILE; (FOR TRACING) */
+            FT_ERROR(( "pk_load_font: error in `pk_read_14'\n" ));
             error = FT_THROW( Unknown_File_Format );
             goto Exit;
           }
@@ -519,6 +520,7 @@ unsigned char   bits_table[] = {
           if (pk_read_n14(stream, dny_f, bw, rs, &(go->bm_table[index]), cc) < 
0)
           {
             /* vf_error = VF_ERR_ILL_FONT_FILE; (FOR TRACING) */
+            FT_ERROR(( "pk_load_font: error in `pk_read_n14'\n" ));
             error = FT_THROW( Unknown_File_Format );
             goto Exit;
           }



reply via email to

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