[bdf] Support `ENCODING -1 <n>' format.
* src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Implement it.
diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c
index 4242cab..8a5ffce 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 */