aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/pcf
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/src/pcf')
-rw-r--r--freetype/src/pcf/pcfdrivr.c15
-rw-r--r--freetype/src/pcf/pcferror.h3
-rw-r--r--freetype/src/pcf/pcfread.c6
3 files changed, 12 insertions, 12 deletions
diff --git a/freetype/src/pcf/pcfdrivr.c b/freetype/src/pcf/pcfdrivr.c
index 30acc7fb1..c24f8b33d 100644
--- a/freetype/src/pcf/pcfdrivr.c
+++ b/freetype/src/pcf/pcfdrivr.c
@@ -2,8 +2,7 @@
FreeType font driver for pcf files
- Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009,
- 2010 by
+ Copyright (C) 2000-2004, 2006-2011 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -36,7 +35,7 @@ THE SOFTWARE.
#include FT_BZIP2_H
#include FT_ERRORS_H
#include FT_BDF_H
-#include FT_TRUETYPE_IDS_H
+#include FT_TRUETYPE_IDS_H
#include "pcf.h"
#include "pcfdrivr.h"
@@ -248,8 +247,6 @@ THE SOFTWARE.
FT_FREE( face->charset_encoding );
FT_FREE( face->charset_registry );
- FT_TRACE4(( "PCF_Face_Done: done face\n" ));
-
/* close compressed stream if any */
if ( pcfface->stream == &face->comp_stream )
{
@@ -274,6 +271,8 @@ THE SOFTWARE.
FT_UNUSED( face_index );
+ FT_TRACE2(( "PCF driver\n" ));
+
error = pcf_load_font( stream, face );
if ( error )
{
@@ -405,7 +404,7 @@ THE SOFTWARE.
return error;
Fail:
- FT_TRACE2(( "[not a valid PCF file]\n" ));
+ FT_TRACE2(( " not a PCF file\n" ));
PCF_Face_Done( pcfface );
error = PCF_Err_Unknown_File_Format; /* error */
goto Exit;
@@ -684,8 +683,8 @@ THE SOFTWARE.
0,
- 0,
- 0,
+ 0, /* FT_Module_Constructor */
+ 0, /* FT_Module_Destructor */
pcf_driver_requester
},
diff --git a/freetype/src/pcf/pcferror.h b/freetype/src/pcf/pcferror.h
index d75c067aa..e51fff8ea 100644
--- a/freetype/src/pcf/pcferror.h
+++ b/freetype/src/pcf/pcferror.h
@@ -4,7 +4,7 @@
/* */
/* PCF error codes (specification only). */
/* */
-/* Copyright 2001 by */
+/* Copyright 2001, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,6 +29,7 @@
#undef __FTERRORS_H__
+#undef FT_ERR_PREFIX
#define FT_ERR_PREFIX PCF_Err_
#define FT_ERR_BASE FT_Mod_Err_PCF
diff --git a/freetype/src/pcf/pcfread.c b/freetype/src/pcf/pcfread.c
index e08da6e72..b86cb9fe0 100644
--- a/freetype/src/pcf/pcfread.c
+++ b/freetype/src/pcf/pcfread.c
@@ -2,8 +2,7 @@
FreeType font driver for pcf fonts
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
- 2010 by
+ Copyright 2000-2010, 2012 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -496,7 +495,8 @@ THE SOFTWARE.
goto Bail;
}
- if ( FT_NEW_ARRAY( strings, string_size ) )
+ /* allocate one more byte so that we have a final null byte */
+ if ( FT_NEW_ARRAY( strings, string_size + 1 ) )
goto Bail;
error = FT_Stream_Read( stream, (FT_Byte*)strings, string_size );