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 upProvide access to a Fonts charmap #358
Comments
|
I've now implemented it for freetype. It'd be awesome if someone could provide the mac part. Feel free to make a PR to my current repo. I'll create a PR to webrender/master when it's finished. Edit: Fix typo |
|
I'd like to help out on this one. I'll start on it on my own, but I don't have much experience with how fonts work so I'll likely have questions. |
|
@MSleepyPanda What's the purpose of this API? I don't see why you'd want to ask webrender for this information instead of just getting it directly. |
|
@jrmuizel Text layouting. At the time, i didn't knew about the difficulties of layouting and that there is much more involved. I thought of low memory foot print and that it would be more reasonable to access the existing font face instance (in webrender). |
|
|
Beeing able to convert a character to the corresponding glyph is a rather useful thing. Wr employs Freetype on Windows&Linux, and Core graphics/text on Apple devices. Both of these font renderers support accessing the character map of a font, but Wr currently doesn't care.
The sole implementation is pretty simple, in FT this is basically one function call. You need to pass it through IPC and you'll have to deal with the Font Context thread pool / parallel execution.
The problem from my point of view is that i don't own an apple device and it therefore makes no sense that i'd create the corresponding apple implementation as i can't verify the implementation. I could provide the FT and API implementation, if someone could provide the core graphics implementation this should probably be ready to push.
I thought about Hackintosh / VM, but getting a legal os x iso is a pain in the apple.
If you can help out or want to share your thought, feel free to comment :)