Skip to content

Commit 1462317

Browse files
committed
font-patcher: Add debug output with some center coordinates
Signed-off-by: Fini Jastrow <[email protected]>
1 parent fac9383 commit 1462317

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

font-patcher

+10-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from __future__ import absolute_import, print_function, unicode_literals
77

88
# Change the script version when you edit this script:
9-
script_version = "4.18.1"
9+
script_version = "4.18.2"
1010

1111
version = "3.3.0"
1212
projectName = "Nerd Fonts"
@@ -1371,6 +1371,15 @@ class font_patcher:
13711371
logger.debug("Final font cell dimensions %d w x %d h%s",
13721372
self.font_dim['width'], self.font_dim['height'],
13731373
' (with icon cell {} h)'.format(int(self.font_dim['iconheight'])) if self.font_dim['iconheight'] != self.font_dim['height'] else '')
1374+
try:
1375+
x_bb = self.sourceFont['x'].boundingBox();
1376+
X_bb = self.sourceFont['X'].boundingBox();
1377+
logger.debug("Center x-height/cell/capitals %d/%d/%d",
1378+
(x_bb[3] - x_bb[1]) / 2 + x_bb[1],
1379+
(self.font_dim['ymax'] - self.font_dim['ymin']) / 2 + self.font_dim['ymin'],
1380+
(X_bb[3] - X_bb[1]) / 2 + X_bb[1])
1381+
except:
1382+
pass
13741383

13751384
self.xavgwidth.append(self.args.xavgwidth)
13761385
if isinstance(self.xavgwidth[-1], int) and self.xavgwidth[-1] == 0:

0 commit comments

Comments
 (0)