aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/pcf
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-08-06 11:48:36 +0000
committermarha <marha@users.sourceforge.net>2010-08-06 11:48:36 +0000
commit20ff8ddf2d9bb41050d10bbc75d61b9161880c7c (patch)
tree22566fcd9663b2baa565cd0c64eaa662d6ba03ee /freetype/src/pcf
parentc29011f2831315d3da9c4727c1e626d80520b97a (diff)
parent6849d83857b4e470a44ad8b6aa5cfb283fd64c89 (diff)
downloadvcxsrv-20ff8ddf2d9bb41050d10bbc75d61b9161880c7c.tar.gz
vcxsrv-20ff8ddf2d9bb41050d10bbc75d61b9161880c7c.tar.bz2
vcxsrv-20ff8ddf2d9bb41050d10bbc75d61b9161880c7c.zip
svn merge ^/branches/released .
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 e5ab43040..14c507e07 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 186326173..596445e86 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 ));