ref: 03242f58c4bf7226276d8e4e7cb106045319e517
parent: 28dd2c45957278e962f95633157b6139de8170aa
author: Werner Lemberg <[email protected]>
date: Sun Feb 26 01:52:56 EST 2012
[bdf] Support `ENCODING -1 <n>' format. * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Implement it.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2012-02-26 Werner Lemberg <[email protected]>
+ [bdf] Support `ENCODING -1 <n>' format.
+
+ * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Implement it.
+
+2012-02-26 Werner Lemberg <[email protected]>
+
[bdf] Fix Savannah bug #35607.
* src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Normalize
--- 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,
@@ -1610,6 +1614,10 @@
/* allows -1, but we can be more generous here. */
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 ));