From 03242f58c4bf7226276d8e4e7cb106045319e517 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sun, 26 Feb 2012 06:52:56 +0100 Subject: [PATCH] [bdf] Support `ENCODING -1 ' format. * src/bdf/bdflib.c (_bdf_parse_glyphs) : Implement it. --- ChangeLog | 6 ++++++ src/bdf/bdflib.c | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index a99df1d5d..f305ef672 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-02-26 Werner Lemberg + + [bdf] Support `ENCODING -1 ' format. + + * src/bdf/bdflib.c (_bdf_parse_glyphs) : Implement it. + 2012-02-26 Werner Lemberg [bdf] Fix Savannah bug #35607. diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c index 4242cab6b..8a5ffceb8 100644 --- a/src/bdf/bdflib.c +++ b/src/bdf/bdflib.c @@ -545,6 +545,10 @@ } + /* The code below ensures that we have at least 4 + 1 `field' */ + /* elements in `list' (which are possibly NULL) so that we */ + /* don't have to check the number of fields in most cases. */ + static FT_Error _bdf_list_split( _bdf_list_t* list, char* separators, @@ -1611,6 +1615,10 @@ if ( p->glyph_enc < -1 ) p->glyph_enc = -1; + /* Check for alternative encoding format. */ + if ( p->glyph_enc == -1 && p->list.used > 2 ) + p->glyph_enc = _bdf_atol( p->list.field[2], 0, 10 ); + FT_TRACE4(( DBGMSG2, p->glyph_enc )); /* Check that the encoding is in the Unicode range because */