Skip to content

refactor: move ofTtfSettings into ofTrueTypeFont #5681

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

Merged
merged 4 commits into from
Jul 4, 2017

Conversation

tgfrerer
Copy link
Member

  • following the same pattern we use with ofFbo and other objects

Example: Create a Settings object, and pass it to load() - here we are instructing an Icon font to load specific unicode ranges:

ofTrueTypeFont myFont;

ofTrueTypeFont::Settings settings("MaterialIcons-Regular.ttf", 26);
settings.antialiased = true;
settings.addRange({0xe889,0xe889}); // history
settings.addRange({0xe034,0xe039}); // play/pause buttons

myFont.load(settings);

The hope is to make the Settings object more discoverable, which should help especially with IDEs that have code completion.

+ following the same pattern we use with ofFbo and other objects

This makes the settings object more discoverable, and should help
especially with IDEs that have code completion.
@arturoc
Copy link
Member

arturoc commented Jun 30, 2017

This seems to be failing cause ofxGui is using the previous syntax

tgfrerer added 2 commits June 30, 2017 15:32
+ update function signatures for setting custom fonts via ofxGui to use
ofxTrueTypeFont::Settings
@tgfrerer
Copy link
Member Author

I've updated ofxGui - also grep'ed examples and addons to see if there were any other uses of ofTtfSettings - seems the 4 locations in ofxGui is all. I've updated the CHANGELOG for good measure.

This reverts commit 426ff19.
@arturoc arturoc merged commit cb290fb into openframeworks:master Jul 4, 2017
@arturoc
Copy link
Member

arturoc commented Jul 4, 2017

thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants