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
Text fixes #156
Text fixes #156
Conversation
rFlex
commented
Sep 6, 2017
- Using bottom as default baseline. I also think the current calculation for the baseline might be a little off, will look a little more in detail when I have the time.
- font-size attributes can end with "px", this change allows that.
|
Please do not close and do the changes yourself. In open source you should allow external contributors to get proper attribution on their work. Do you have an SVG example where baseline top should be the default? In my test SVGs Macaw doesn't render the text at the right location at all compared to Chrome or even SVGKit. Changing the baseline fixes it. |
@rFlex my apologies, sure. Well, my understanding of the baseline change was it was too generic and might break some existing code. What do you think if we move it to the SVG parser? Would that work? |
@kayuri I agree that it might break existing code, not sure how to work around that because the problem is that the current behavior seems incorrect. Example SVG:
|
@rFlex I think we can probably just change the way our parser works, e.g. in SVGParser change |
@rFlex I took a liberty of making a quick fix for text baseline. Works fine for SVG from your comment. Could you please update your PR? |
got it @kayuri , updated! |
Hi Simon, Sorry for delay from Macaw Team. I'm going to apply all your patches in the nearest time. Hope you'll be available for little fixes if necessary. Regarding this issue, could you please create pull request with only this commit which related to this issue? Other changes related to implementing |
Parse units in font sizes (Tribute to #156 Text fixes)
These issues were fixed as part of the SVG parser improvements (see f3dm76@843cac6) |