Commit bca332875d15c09292a76812e7ad10622efd7eb0

David Turner 2000-07-19T20:17:37

Boris's patch regarding glyph index 0

diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c
index 9f31ce5..2a14fc0 100644
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -482,9 +482,9 @@
 
       char_code -= first;
       if ( char_code < count )
-        result = char_code;
+        result = char_code+1;
       else
-        result = font->header.default_char - first;
+        result = 0;
     }
 
     return result;
@@ -515,6 +515,11 @@
       goto Exit;
     }
 
+    if (glyph_index > 0)
+      glyph_index--;
+    else
+      glyph_index = font->header.default_char - font->header.first_char;
+      
     new_format = font->header.version == 0x300;
     len        = new_format ? 6 : 4;