WIP: Switch to ab_glyph#7
Draft
okin wants to merge 3 commits into
Draft
Conversation
f2fedc6 to
476144f
Compare
The previously used rusttype is unmaintained. With the switch we also bump the dependencies of image and imageproc, because newer versions support ab_glyph better and made porting much easier. The port changes the API in some places. The custom type Color is now an alias to Rgba<u8>. This a user-facing change where users now have to submit appropriate types. Image.text_size will return u32 instead of i32. Image.add_custom_font will now take a ref of the loaded font file. Fixes jeffersoncbd#5
476144f to
758f35e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is moving from
rusttypetoab_glyphas requested in #5.While the code runs and tests pass, I've marked this as WIP, because running the main program will not output the same image as before.
Something seems to go wrong when cropping the image and I haven't yet found out where this problem comes from (in
main.rsline 37 change y from143to82and it kinda works).TODO:
README.md