summaryrefslogtreecommitdiff
path: root/system/bitmapfont2ttf/derive_pixel_size.diff
blob: 60afe3242c5777686732b95963e94a07cb81470a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
diff -Naur bitmapfont2ttf-20200215_03529d2/bin/bitmapfont2ttf bitmapfont2ttf-20200215_03529d2.patched/bin/bitmapfont2ttf
--- bitmapfont2ttf-20200215_03529d2/bin/bitmapfont2ttf	2020-06-08 17:30:53.000000000 -0400
+++ bitmapfont2ttf-20200215_03529d2.patched/bin/bitmapfont2ttf	2020-06-21 04:06:26.622171278 -0400
@@ -122,6 +122,9 @@
                 continue
             (cmd, args) = (args[0].upper(), args[1:])
             if cmd == 'ENDPROPERTIES':
+                if self.pixelSize == None:
+                  self.pixelSize = int(self.ascent + self.descent)
+                  sys.stderr.write('*** missing PIXEL_SIZE property, derived from FONT_ASCENT + FONT_DESCENT: %d\n' % self.pixelSize);
                 return
             if cmd == 'PIXEL_SIZE' and len(args) >= 1:
                 self.pixelSize = float(args[0])