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

Implement Clone for Face #96

Closed
abonander opened this issue Jan 8, 2015 · 2 comments · Fixed by #126
Closed

Implement Clone for Face #96

abonander opened this issue Jan 8, 2015 · 2 comments · Fixed by #126
Assignees
Labels

Comments

@abonander
Copy link
Contributor

The same FT_Face instance can be used in multiple locations as long as it's not used across threads. Since Face does not implement Send or Sync, we should be safe simply incrementing the refcount of FT_Face and FT_Library and copying the pointers.

Needed by PistonDevelopers/opengl_graphics#115

@bvssvni
Copy link
Member

bvssvni commented Mar 4, 2015

I assume increasing the reference counter is done by ffi::FT_Reference_Library(self.library_raw); and ffi::FT_Reference_Face(self.raw).

@bvssvni bvssvni removed the draft label Mar 4, 2015
@bvssvni bvssvni self-assigned this Mar 4, 2015
@abonander
Copy link
Contributor Author

I think that's it, yeah. I believe they're both already decremented on-drop.

bvssvni added a commit to bvssvni/freetype-rs that referenced this issue Mar 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants