Skip to content

Commit

Permalink
Fix for OS/2 blocks with 0 for ascent/descent/line_gap.
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeMonkeySteve authored and bradediger committed Dec 20, 2010
1 parent b48c1e4 commit 1d488ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ttfunk.rb
Expand Up @@ -22,15 +22,15 @@ def initialize(contents)




def ascent def ascent
@ascent ||= os2.exists? && os2.ascent || horizontal_header.ascent @ascent ||= (os2.exists? && os2.ascent && os2.ascent.nonzero?) || horizontal_header.ascent
end end


def descent def descent
@descent ||= os2.exists? && os2.descent || horizontal_header.descent @descent ||= (os2.exists? && os2.descent && os2.descent.nonzero?) || horizontal_header.descent
end end


def line_gap def line_gap
@line_gap ||= os2.exists? && os2.line_gap || horizontal_header.line_gap @line_gap ||= (os2.exists? && os2.line_gap && os2.line_gap.nonzero?) || horizontal_header.line_gap
end end


def bbox def bbox
Expand Down

0 comments on commit 1d488ac

Please sign in to comment.