summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParth Wazurkar <parthwazurkar@gmail.com>2018-08-02 00:48:05 +0530
committerParth Wazurkar <parthwazurkar@gmail.com>2018-08-02 00:48:05 +0530
commitdddc46b0b8f2c179f0e209b92390a3aaa7375959 (patch)
tree77ef263adb9c8a114bbcd0b66dd033c27c0e03a4
parent1b16b2267ea93e5c040fec04bacc2e1e5bd78180 (diff)
downloadfreetype2-dddc46b0b8f2c179f0e209b92390a3aaa7375959.tar.gz
[pk] Fixes.
* Now pk driver loads bitmaps properly and ftview displays proper glyphs from pk driver.
-rw-r--r--include/freetype/internal/tfm.h2
-rw-r--r--src/pk/pklib.c10
-rw-r--r--src/tfm/tfmobjs.c1
3 files changed, 8 insertions, 5 deletions
diff --git a/include/freetype/internal/tfm.h b/include/freetype/internal/tfm.h
index 895786e8a..7462e01ee 100644
--- a/include/freetype/internal/tfm.h
+++ b/include/freetype/internal/tfm.h
@@ -48,7 +48,7 @@ FT_BEGIN_HEADER
/* Font Info */
FT_Long cs; /* Check Sum */
/* Metrics */
- FT_ULong ds; /* Design Size */
+ FT_ULong ds, fs; /* Design Size */
FT_UInt design_size;
FT_UInt slant;
FT_UInt begin_char, end_char;
diff --git a/src/pk/pklib.c b/src/pk/pklib.c
index 09a62e507..c4fcfbdcf 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;
}
diff --git a/src/tfm/tfmobjs.c b/src/tfm/tfmobjs.c
index 69ec22e16..35c8ff4af 100644
--- a/src/tfm/tfmobjs.c
+++ b/src/tfm/tfmobjs.c
@@ -167,6 +167,7 @@
return error;
lf = (FT_ULong)READ_UINT2( stream );
+ fi->fs = 4*lf - 1 ;
#if 0
if ((lf == 11) || (lf == 9))