mirror of
https://github.com/foliojs/pdfkit.git
synced 2025-12-08 20:15:54 +00:00
prevent missing ascender from breaking layout
This commit is contained in:
parent
ea22822d6c
commit
3acfa5833d
@ -13,8 +13,8 @@ class AFMFont
|
||||
@charWidths = (@glyphWidths[characters[i]] for i in [0..255])
|
||||
|
||||
@bbox = (+e for e in @attributes['FontBBox'].split /\s+/)
|
||||
@ascender = +@attributes['Ascender']
|
||||
@decender = +@attributes['Descender']
|
||||
@ascender = +(@attributes['Ascender'] or 0)
|
||||
@decender = +(@attributes['Descender'] or 0)
|
||||
@lineGap = (@bbox[3] - @bbox[1]) - (@ascender - @decender)
|
||||
|
||||
parse: ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user