Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions font-patcher
Original file line number Diff line number Diff line change
Expand Up @@ -1408,16 +1408,16 @@ class font_patcher:
if self.font_dim['width'] < self.font_dim['xmax']:
logger.debug("Font has negative right side bearing in extended glyphs")
self.font_dim['xmax'] = self.font_dim['width'] # In fact 'xmax' is never used
if self.font_dim['width'] <= 0:
logger.critical("Can not detect sane font width")
sys.exit(1)
if isinstance(self.args.cellopt, list):
logger.debug("Overriding cell X{%d:%d} with X{%d:%d}",
self.font_dim['xmin'], self.font_dim['xmin'] + self.font_dim['width'],
self.args.cellopt[0], self.args.cellopt[1])
self.font_dim['xmin'] = self.args.cellopt[0]
self.font_dim['xmax'] = self.args.cellopt[1]
self.font_dim['width'] = self.args.cellopt[1]
if self.font_dim['width'] <= 0:
logger.critical("Can not detect sane font width")
sys.exit(1)
if self.args.cellopt:
logger.info("Cell coordinates (Xmin:Xmax:Ymin:Ymax) %s%d:%d:%d:%d",
'' if not isinstance(self.args.cellopt, list) else 'overridden with ',
Expand Down Expand Up @@ -1697,7 +1697,7 @@ class font_patcher:
cell_width = self.font_dim['width']
if sym_attr['align'] == 'c':
# Center align
x_align_distance += (cell_width / 2) - (sym_dim['width'] / 2)
x_align_distance += (cell_width * self.get_target_width(stretch) / 2) - (sym_dim['width'] / 2)
elif sym_attr['align'] == 'r':
# Right align
# (not really supported with pa scaling and 2x stretch in NFP)
Expand Down