-
Notifications
You must be signed in to change notification settings - Fork 479
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
Getting outlines of variable font? #400
Comments
I haven't tried it myself, but looking around, I found @devongovett's comment about fontkit which states it supports it. It appears that you can call font.getVariation which
|
fontkit doesn't really work in the browser ;/ |
Get variable font vectors in the browser, fontkit loading variable font. For a demo while working with ThreeJS via WebKit (npm run dev)
|
Variable font rendering has been implemented via #699, so this is now possible. See the new example: font.variation.getTransform(2, { test: 0.42 }); This would get the transformed copy of the glyph with index 2, with the axis with the tag |
Hi! Would it be possible to get the letterform outlines (or key points, or Bezier paths) of a variable font with custom axes, with a particular variable setting, using opentype.js?
Say that I am using AmstelvarAlpha.ttf, and I would like to set the text “Hello” with axes “opsz=11.8, wght=400, grad=100….” (and so on). Is there some way I can get access to the letterforms of the “Hello” as paths or key points?
I see that the live demo handles Amstelvar and can get its outlines fine. I think those are the outlines of Amstelvar with its default settings. However, I wasn't sure how to set a variation of Amstelvar and get those outlines.
I also looked at variableFont.js, which seems to parse the font tables of a variable font, but doesn't offer the outlines.
Any suggestions would be greatly appreciated.
The text was updated successfully, but these errors were encountered: