New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement get_font_metrics #69

Closed
wants to merge 3 commits into
base: drawing
from

Conversation

2 participants
@karipe
Contributor

karipe commented Nov 13, 2012

Implement get_font_metrics method. It is wrapper of MagickQueryFontMetrics and MagickQueryMultilineFontMetrics.

@dahlia

This comment has been minimized.

Collaborator

dahlia commented Nov 13, 2012

Test fails on my machine:

wandtests.drawing.get_font_metrics_test
────────────────────────────────────────────────────────────────────────────────
Traceback (most recent call last):
  File "/Users/dahlia/Desktop/wand-drawing/wandtests/drawing.py", line 175, in get_font_metrics_test
    assert not_multiline_and_not_linebreak == \
TestFailure

assert (not_multiline_and_not_linebreak == FontMetrics(character_width=13.0, character_height=13.0, ascender=10.0, descender=-3.0, text_width=221.125, text_height=16.0, maximum_horizontal_advance=14.0, x1=-0.125, y1=-3.0, x2=10.0, y2=9.0, x=221.0, y=0.0))
assert (FontMetrics(character_width=13.0, character_height=13.0, ascender=12.0, descender=-3.0, text_width=236.125, text_height=15.0, maximum_horizontal_advance=26.0, x1=-0.125, y1=-3.0, x2=10.71875, y2=9.421875, x=236.0, y=0.0) == FontMetrics(character_width=13.0, character_height=13.0, ascender=10.0, descender=-3.0, text_width=221.125, text_height=16.0, maximum_horizontal_advance=14.0, x1=-0.125, y1=-3.0, x2=10.0, y2=9.0, x=221.0, y=0.0))

Failures: 1/19 (26 assertions)
$ python -m wand.version --verbose
Wand 0.3.0
ImageMagick 6.7.7-6 2012-11-14 Q16 http://www.imagemagick.org

We seem to need to change the way we test this feature.

@karipe karipe closed this Nov 14, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment