Skip to content
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

Generator: conversions to SVG fonts are incomplete #17

Closed
carlosame opened this issue May 14, 2021 · 1 comment
Closed

Generator: conversions to SVG fonts are incomplete #17

carlosame opened this issue May 14, 2021 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@carlosame
Copy link
Member

Conversions to SVG fonts in svggen are incomplete and do not include all font metrics. As a result, text decorations are rendered inaccurately, like in the following comparison image where the expected render is at the left:

ContextFontDecoration_cmp

Support at least strikethrough-* and underline-* attributes.

@carlosame carlosame added this to the 0.1.1 milestone May 14, 2021
@carlosame carlosame added the bug Something isn't working label May 14, 2021
carlosame added a commit that referenced this issue May 14, 2021
I changed the behavior of 'strikethrough-position' in 'SVGGVTFont', as its sign was being changed there but,
according to the SVG 1.1 specification:

"Unlike standard graphics in SVG, where the initial coordinate system has the y-axis pointing downward (see
The initial coordinate system), the design grid for SVG fonts, along with the initial coordinate system for
the glyphs, has the y-axis pointing upward for consistency with accepted industry practice for many popular
font formats."
@carlosame
Copy link
Member Author

carlosame commented May 14, 2021

I changed the behavior of strikethrough-position in SVGGVTFont, as its sign was being changed there but, according to the SVG 1.1 specification:

Unlike standard graphics in SVG, where the initial coordinate system has the y-axis pointing downward (see The initial coordinate system), the design grid for SVG fonts, along with the initial coordinate system for the glyphs, has the y-axis pointing upward for consistency with accepted industry practice for many popular font formats.

Now, all the font-related tests pass.

EDIT: I later reverted that change, to retain compatibility with Batik see aadcb46.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant