shithub: freetype+ttf2subf

Download patch

ref: 28dd2c45957278e962f95633157b6139de8170aa
parent: 58cbc465d2ccd904dee755cff791fbb3a866646d
author: Werner Lemberg <[email protected]>
date: Sun Feb 26 01:18:58 EST 2012

[bdf] Fix Savannah bug #35607.

* src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Normalize
negative encoding values.

git/fs: mount .git/fs: mount/attach disallowed
binary files a/ChangeLog b/ChangeLog differ
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -1606,6 +1606,11 @@
 
       p->glyph_enc = _bdf_atol( p->list.field[1], 0, 10 );
 
+      /* Normalize negative encoding values.  The specification only */
+      /* allows -1, but we can be more generous here.                */
+      if ( p->glyph_enc < -1 )
+        p->glyph_enc = -1;
+
       FT_TRACE4(( DBGMSG2, p->glyph_enc ));
 
       /* Check that the encoding is in the Unicode range because  */