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

Text Fallback for unavailable glyphs #5

Closed
wants to merge 3 commits into from
Closed

Conversation

k-lange
Copy link
Member

@k-lange k-lange commented Dec 5, 2017

Fix for #1

If one of the two characters can't be found inside our font, we simply return a <text> element instead of a <path>. This is not an optimal solution, since we don't have control over how the resulting svg will look, but for now the simplest solution. Also the png version might not work when deployed, since it will rely on system fonts on the server.

In the future we could look at Noto, but unfortunately that's also not available as a single font file. That means we'd have to iterate through several files and even merge two paths if we can't find both characters in a single font file.

@k-lange k-lange requested a review from jotaen December 5, 2017 10:03
Copy link
Contributor

@jotaen jotaen left a comment

Choose a reason for hiding this comment

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

I’m genuinely happy to see how this service is growing and evolving 😃

Changes are looking good. With which glyphs did you test the texts though? We could consider reducing the font size a bit (see screenshot)

@jotaen
Copy link
Contributor

jotaen commented Dec 6, 2017

screen shot 2017-12-06 at 09 52 11

@jotaen
Copy link
Contributor

jotaen commented Dec 6, 2017

A different thing that I noticed is that the service doesn’t work inside docker anymore. (Even docker build . fails.)

@k-lange
Copy link
Member Author

k-lange commented Apr 15, 2019

With the new font in #6 we support more characters, that will have to do for now. How it's done in this PR does not work anymore since we also support PNG now.

@k-lange k-lange closed this Apr 15, 2019
@k-lange k-lange deleted the text-fallback branch April 15, 2019 08:36
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.

2 participants