Skip to content

Commit

Permalink
Revert the font-size: 0 detection
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Sep 2, 2011
1 parent e4d5e4c commit fed326d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions weasy/draw/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,11 @@ def draw_replacedbox(context, box):

def draw_text(context, textbox):
"""Draw ``textbox`` to a ``cairo.Context`` from ``PangoCairo.Context``."""
# Pango crashes with font-size: 0
font_size = get_single_pixel_value(textbox.style.font_size)
if font_size == 0:
return

context.move_to(textbox.position_x, textbox.position_y)
fragment = TextLineFragment.from_textbox(textbox, context=context)
fragment.show_layout()
Expand Down

0 comments on commit fed326d

Please sign in to comment.