-
Notifications
You must be signed in to change notification settings - Fork 212
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
Correct orientation? #63
Comments
I am facing the same problem. @emrosenf What solution did you arrive at for this? |
this is how fonts work: the coordinate system in OpenType is flipped with respect to SVG's coordinate system. Just use a |
How about flipping while printing to canvas? I know it can be done, but its troublesome... My current code looks like this, and its not nice: canvasContext.translate(0, 64);
canvasContext.scale(1, -1);
glyph.render(canvasContext, 64);
canvasContext.scale(1, -1);
canvasContext.translate(0, -64); IMO, it should be done by default while rendering onto canvas. |
Sorry for the elementary question. I'm following the example from fonttest to turn a text string into an SVG path. When you load the resulting SVG file in the browser, the glyphs are flipped.
I understand that by convention, the y-axis for SVG points downward whereas for fonts it points upward. My question is: what is the best way to work with the path data so that the glyphs appear with proper orientation? Can I generate the path data so that it appears right-side-up to begin with Should I wrap everything in a
<g transform="scale(1,-1)">
?The text was updated successfully, but these errors were encountered: