Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upimplement glyph_by_name method #27
Conversation
|
I've opened a PR against |
rvolgers
commented
Feb 17, 2019
•
|
Some notes for DirectWrite. Indeed it looks like there's no other way than parsing cff yourself... CFF: CFF2 (but these probably also have a cmap, so not relevant to the stated use case): (Note: this is just a driveby comment since I happened to come across this issue.) |
| @@ -779,6 +801,11 @@ fn format_to_cg_color_space_and_image_format(format: Format) -> Option<(CGColorS | |||
| } | |||
| } | |||
|
|
|||
| #[link(name = "CoreGraphics", kind = "framework")] | |||
| extern { | |||
This comment has been minimized.
This comment has been minimized.
pcwalton
Feb 28, 2019
Collaborator
Looks like upstream has this method now; can we switch to using it?
This comment has been minimized.
This comment has been minimized.
srijs
Mar 5, 2019
Author
Contributor
@pcwalton it's been merged, but it looks like core-text hasn't cut a new release yet. Is that something you could help out with?
This comment has been minimized.
This comment has been minimized.
|
@pcwalton updated the PR to use new functionality in |
|
Just got a report of a problem with the freetype loader over in srijs/rpdf#2, I‘ll have a go at fixing it later today! |
|
Should be all fixed now! |
srijs commentedFeb 8, 2019
This change implements looking up glyphs by their name, which is useful when dealing with fonts that may not have a cmap (in my case certain CFF files).
Implementing this outside fontkit, although possible, is quite cumbersome as I basically need to mirror all the platform-specific dependencies and compilation flags.
There's two rough edges at the moment that I'm happy to try and fix up if you're generally interested in this change. One being the FFI binding for
CTFontGetGlyphWithNamethat should probably move into thecore-textcrate, and the other that there appears to be no simple way to do name-based lookup using the DirectWrite APIs.Let me know what you think!