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

Supporting TTC Fonts #12

Open
piersdeseilligny opened this issue Nov 20, 2021 · 1 comment
Open

Supporting TTC Fonts #12

piersdeseilligny opened this issue Nov 20, 2021 · 1 comment

Comments

@piersdeseilligny
Copy link

piersdeseilligny commented Nov 20, 2021

I noticed that font-finder doesn't support TTC Fonts, which makes it difficult to support Chinese text in applications which use font-finder, as all of Windows' default Chinese fonts are .ttc.

If necessary, I can look into adding support myself - is there anything I should know before starting to look into this? Admittedly I know very little about font formats, so would be researching all of this from scratch.

piersdeseilligny added a commit to piersdeseilligny/font-finder that referenced this issue Nov 22, 2021
Support for decoding the header of ttc files and the first font within it, but broken for any subsequent fonts
@piersdeseilligny
Copy link
Author

So I've been able to add initial support for TTC Files (see commit above) but am having difficulty with the apparent necessity to 'reset' a stream's position, after a font within the collection has been parsed (presumably here). Given that you also wrote promise-stream-reader, would you recommend a specific way of doing so?

piersdeseilligny added a commit to piersdeseilligny/font-finder that referenced this issue Dec 17, 2021
Add full support for finding and parsing TrueType Collection fonts

Potentially breaking change, because get and getMetadata can now return a NamedFont[] array if the specified file is a TrueType Collection (.ttc)
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

No branches or pull requests

1 participant