aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/pcf
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-08-06 10:14:25 +0000
committermarha <marha@users.sourceforge.net>2010-08-06 10:14:25 +0000
commit47ed6413ce8f2586b8d542dc46055e075a47022e (patch)
treeb814efb2655c444a4f63ac3cbb7d0cdf4bb3ef2f /freetype/src/pcf
parentc115795736eb99a8f2288a06c231b9386f4d011f (diff)
downloadvcxsrv-47ed6413ce8f2586b8d542dc46055e075a47022e.tar.gz
vcxsrv-47ed6413ce8f2586b8d542dc46055e075a47022e.tar.bz2
vcxsrv-47ed6413ce8f2586b8d542dc46055e075a47022e.zip
Updated to freetype 2.4.1
Diffstat (limited to 'freetype/src/pcf')
-rw-r--r--freetype/src/pcf/pcfdrivr.c13
-rw-r--r--freetype/src/pcf/pcfread.c6
2 files changed, 13 insertions, 6 deletions
diff --git a/freetype/src/pcf/pcfdrivr.c b/freetype/src/pcf/pcfdrivr.c
index b34e542ae..6c0aa0f9e 100644
--- a/freetype/src/pcf/pcfdrivr.c
+++ b/freetype/src/pcf/pcfdrivr.c
@@ -34,6 +34,7 @@ THE SOFTWARE.
#include FT_LZW_H
#include FT_ERRORS_H
#include FT_BDF_H
+#include FT_TRUETYPE_IDS_H
#include "pcf.h"
#include "pcfdrivr.h"
@@ -227,7 +228,8 @@ THE SOFTWARE.
{
prop = &face->properties[i];
- if ( prop ) {
+ if ( prop )
+ {
FT_FREE( prop->name );
if ( prop->isString )
FT_FREE( prop->value.atom );
@@ -358,14 +360,15 @@ THE SOFTWARE.
charmap.face = FT_FACE( face );
charmap.encoding = FT_ENCODING_NONE;
- charmap.platform_id = 0;
- charmap.encoding_id = 0;
+ /* initial platform/encoding should indicate unset status? */
+ charmap.platform_id = TT_PLATFORM_APPLE_UNICODE;
+ charmap.encoding_id = TT_APPLE_ID_DEFAULT;
if ( unicode_charmap )
{
charmap.encoding = FT_ENCODING_UNICODE;
- charmap.platform_id = 3;
- charmap.encoding_id = 1;
+ charmap.platform_id = TT_PLATFORM_MICROSOFT;
+ charmap.encoding_id = TT_MS_ID_UNICODE_CS;
}
error = FT_CMap_New( &pcf_cmap_class, NULL, &charmap, NULL );
diff --git a/freetype/src/pcf/pcfread.c b/freetype/src/pcf/pcfread.c
index 08becf99c..f7326238c 100644
--- a/freetype/src/pcf/pcfread.c
+++ b/freetype/src/pcf/pcfread.c
@@ -2,7 +2,8 @@
FreeType font driver for pcf fonts
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+ 2010 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -607,6 +608,9 @@ THE SOFTWARE.
face->nmetrics = nmetrics;
+ if ( !nmetrics )
+ return PCF_Err_Invalid_Table;
+
FT_TRACE4(( "pcf_get_metrics:\n" ));
FT_TRACE4(( " number of metrics: %d\n", nmetrics ));