@JonB Thank you! This works very well. I won't hesitate to say it would be great to see this wrapped in python so users could open their fonts, read all the axes available and hook up a method to modify each value of the axis then use it with other tools available in Pythonista already. I am now looking up how can i build on top of what you have written. I have some questions still, please look into my comments/questions on your code: https://gist.github.com/dyyybek/810fced40405346682729e8e5568d9a3
Summing up the comments on code:
- We now have a CTFont object with variations – does it mean we could use it to set type with a layout engine as opposed to drawing paths?
- Would it be possible to use this font with standard tools in Pythonista?
Is this a place to start looking at how to set a line of text?
Using TextKit
Core Text mediates between text layout and font support provided by higher level frameworks and the low-level capabilities Quartz provides to all text and font frameworks. The Quartz framework acts upon glyphs and their positions. Core Text is aware of how characters map to fonts, and it factors in information about styles, font metrics, and other attributes before it calls into Quartz to render text. Quartz is the only way to get glyphs drawn at a fundamental level, and, because Core Text provides all data in a form directly usable by Quartz, the result is high-performance text rendering.