diff options
author | Werner Lemberg <wl@gnu.org> | 2008-08-04 18:46:37 +0000 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2008-08-04 18:46:37 +0000 |
commit | 7fd201829a5306a802fd4c3c050a5e1813b3e964 (patch) | |
tree | 6557261fd2746f8fb6be100ae46ec0e366ef2ce2 /src/cid/cidload.c | |
parent | eba3eeecd9578bd6217d276cb1b715d77ecaab87 (diff) | |
download | freetype2-7fd201829a5306a802fd4c3c050a5e1813b3e964.tar.gz |
* src/type1/t1tokens.h: Handle `ForceBold' keyword. This fixes
Savannah bug #23995.
* src/cid/cidload.c (parse_expansion_factor): New callback function.
(cid_field_records): Use it for `ExpansionFactor'.
* src/cod/cidtoken.h: Handle `ForceBold' keyword.
Don't handle `ExpansionFactor'.
Diffstat (limited to 'src/cid/cidload.c')
-rw-r--r-- | src/cid/cidload.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/cid/cidload.c b/src/cid/cidload.c index 9ed8cee46..ec24710d5 100644 --- a/src/cid/cidload.c +++ b/src/cid/cidload.c @@ -234,14 +234,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 } }; |