Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix #141 "Loader::raster_bounds" to work as intended. #142
Conversation
This fixes maths in Loader::raster_bounds, so that it actually returns tight raster bounds. Previously, it returned distored bounds due to usage of "RectF::set_origin_y" which does not preserve Rect size.
|
Can you add a test as well? |
|
@jrmuizel I can surely try my best, can you please recommend what's an appropriate test for this use case? |
|
You can probably just hard code the expected bounds for a sample glyph of Inconsolata or EBGaramond12 which are already in the repository. The existing tests in src/test.rs make use of them and you should be able to just do something similar. |
b753684
to
bb8b7f4
bb8b7f4
to
27d77df
|
@jrmuizel ready for review |
ikatson commentedApr 17, 2020
This fixes issue #141, so that Loader::raster_bounds actually returns tight raster bounds.
Previously, it returned distorted bounds due to usage of "RectF::set_origin_y"
which does not preserve Rect size.