mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
More vertical font merging typos
This commit is contained in:
parent
51d434ecea
commit
e4ef69b78f
@ -42,7 +42,7 @@ def merge_truetype_fonts_for_pdf(*fonts):
|
||||
vhea = ans.get(b'vhea')
|
||||
if vhea is not None:
|
||||
vhea.read_data(ans[b'vmtx'])
|
||||
advance_heights = tuple(x/head.units_per_em for x in hhea.advance_heights)
|
||||
advance_heights = tuple(x/head.units_per_em for x in vhea.advance_heights)
|
||||
|
||||
def width_for_glyph_id(gid):
|
||||
if gid >= len(advance_widths):
|
||||
@ -50,7 +50,7 @@ def merge_truetype_fonts_for_pdf(*fonts):
|
||||
return advance_widths[gid]
|
||||
|
||||
def height_for_glyph_id(gid):
|
||||
if gid >= len(advance_widths):
|
||||
if gid >= len(advance_heights):
|
||||
gid = -1
|
||||
return advance_heights[gid]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user