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

Bugfix of true type font copying #5124

Merged
merged 5 commits into from
Jun 13, 2016
Merged

Bugfix of true type font copying #5124

merged 5 commits into from
Jun 13, 2016

Conversation

Paul92
Copy link
Contributor

@Paul92 Paul92 commented Jun 13, 2016

The problem, described in issue #5123, was caused by the copy/assignment constructors of the ofTrueTypeFont that did not copy all the members to the target.

Since my familiarity with openFrameworks and C++ knowledge are limited, please check if my additions are relevant/do not have any side effects.

The bug was apparently fixed and did not cause any visible side effects. Tested on the small sample of code I've shown in the issue and on few examples (such as graphics/fontShapesExample and graphics/fontsExample).

@bakercp
Copy link
Member

bakercp commented Jun 13, 2016

If you've tested this and the appveyor/travis tests pass, this seems pretty solid from a code-review standpoint. Thanks for the contribution.

texAtlas = mom.texAtlas;
stringQuads = mom.stringQuads;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you change this to stringQuads = std::move(mom::stringQuads)

@arturoc
Copy link
Member

arturoc commented Jun 13, 2016

hey, thanks! i've added a couple of comments, you could also just remove those lines since that variable is just a cache and not copying/moving it shouldn't have any effect

@Paul92
Copy link
Contributor Author

Paul92 commented Jun 13, 2016

Done. Since you said is just a cache, I removed it from all constructors and it seems to work.

@arturoc arturoc merged commit f6c3f72 into openframeworks:master Jun 13, 2016
@arturoc
Copy link
Member

arturoc commented Jun 13, 2016

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.

3 participants