summaryrefslogtreecommitdiff
path: root/src/freetype2/cid/cidload.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/freetype2/cid/cidload.c')
-rw-r--r--src/freetype2/cid/cidload.c36
1 files changed, 32 insertions, 4 deletions
diff --git a/src/freetype2/cid/cidload.c b/src/freetype2/cid/cidload.c
index 9ed8cee..3bb3594 100644
--- a/src/freetype2/cid/cidload.c
+++ b/src/freetype2/cid/cidload.c
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 font loader (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2009 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -97,6 +97,10 @@
object = (FT_Byte*)&cid->font_info;
break;
+ case T1_FIELD_LOCATION_FONT_EXTRA:
+ object = (FT_Byte*)&face->font_extra;
+ break;
+
case T1_FIELD_LOCATION_BBOX:
object = (FT_Byte*)&cid->font_bbox;
break;
@@ -108,7 +112,7 @@
if ( parser->num_dict < 0 )
{
- FT_ERROR(( "cid_load_keyword: invalid use of `%s'!\n",
+ FT_ERROR(( "cid_load_keyword: invalid use of `%s'\n",
keyword->ident ));
error = CID_Err_Syntax_Error;
goto Exit;
@@ -234,14 +238,38 @@
}
+ /* by mistake, `expansion_factor' appears both in PS_PrivateRec */
+ /* and CID_FaceDictRec (both are public header files and can't */
+ /* changed); we simply copy the value */
+
+ FT_CALLBACK_DEF( FT_Error )
+ parse_expansion_factor( CID_Face face,
+ CID_Parser* parser )
+ {
+ CID_FaceDict dict;
+
+
+ if ( parser->num_dict >= 0 )
+ {
+ dict = face->cid.font_dicts + parser->num_dict;
+
+ dict->expansion_factor = cid_parser_to_fixed( parser, 0 );
+ dict->private_dict.expansion_factor = dict->expansion_factor;
+ }
+
+ return CID_Err_Ok;
+ }
+
+
static
const T1_FieldRec cid_field_records[] =
{
#include "cidtoken.h"
- T1_FIELD_CALLBACK( "FDArray", parse_fd_array, 0 )
- T1_FIELD_CALLBACK( "FontMatrix", parse_font_matrix, 0 )
+ T1_FIELD_CALLBACK( "FDArray", parse_fd_array, 0 )
+ T1_FIELD_CALLBACK( "FontMatrix", parse_font_matrix, 0 )
+ T1_FIELD_CALLBACK( "ExpansionFactor", parse_expansion_factor, 0 )
{ 0, T1_FIELD_LOCATION_CID_INFO, T1_FIELD_TYPE_NONE, 0, 0, 0, 0, 0, 0 }
};