shithub: freetype+ttf2subf

Download patch

ref: 834b53ed0e331a14c1db674e9628c2a980c5d237
parent: ed581a3434665e9f581b71a1cefada3b0e7ff5c7
author: Tom Kacvinsky <[email protected]>
date: Sun Nov 26 22:23:50 EST 2000

Simplied glyph width processing code and the comments pertaining to it.

git/fs: mount .git/fs: mount/attach disallowed
--- a/src/cff/t2gload.c
+++ b/src/cff/t2gload.c
@@ -855,15 +855,13 @@
 
           if ( num_args > 0 && decoder->read_width )
           {
-            /* If `nominal_width' is non-zero, the number is really a      */
-            /* difference against `nominal_width'.                         */
-            if ( decoder->nominal_width )
-              decoder->glyph_width = decoder->nominal_width +
-                                       ( stack[0] >> 16 );
-            /* Else, the number here is truly a width, not a difference.   */
-            else
-              decoder->glyph_width = stack[0] >> 16;
+            /* If `nominal_width' is non-zero, the number is really a difference */
+            /* against `nominal_width'.  Else, the number here is truly a width, */
+            /* not a difference.  If the font does not set `nominal_width', then */
+            /* `nominal_width' defaults to zero, and so we can set 'glyph_width' */
+            /* to `nominal_width' plus number on the stack -- for either case.   */
 
+            decoder->glyph_width = decoder->nominal_width + ( stack[0] >> 16 );
             num_args--;
             args++;
           }