Skip to content

Commit

Permalink
Merge pull request #303 from ef4/blank-ascender
Browse files Browse the repository at this point in the history
Prevent missing ascender from breaking layout
  • Loading branch information
devongovett committed Sep 12, 2014
2 parents 33920c3 + 3acfa58 commit 8383dee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/font/afm.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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: ->
Expand Down

0 comments on commit 8383dee

Please sign in to comment.