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

switch the default font to TeX Gyre Heros #68

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

exaexa
Copy link
Contributor

@exaexa exaexa commented Jan 14, 2025

(freer than helvetica from mscorefonts, has more unicode support, and a distribution-friendly license)

Kinda related to #67 .

Closes #66 .

(freer than helvetica from mscorefonts, with distribution-friendly license)
@davibarreira
Copy link
Owner

Makie ships helvitca, is their version different in any way? In order to change from helvetica to tex gyre, we should add it to the assets.

@exaexa
Copy link
Contributor Author

exaexa commented Jan 14, 2025

Maybe Makie will have license issues too. If this seems acceptable I'll add some of the fonts.

@exaexa
Copy link
Contributor Author

exaexa commented Jan 15, 2025

oh whoops, fixed a typo. 😅

@exaexa
Copy link
Contributor Author

exaexa commented Jan 15, 2025

ok I looked at the tests and since the other font is very slightly different, it fails the exact tests now.

I guess I should simplify more.

@exaexa exaexa force-pushed the mk-default-texgyre branch from bf2066d to 9332f16 Compare January 15, 2025 13:03
@exaexa exaexa marked this pull request as draft January 15, 2025 13:04
@exaexa
Copy link
Contributor Author

exaexa commented Jan 15, 2025

@davibarreira hey btw while I'm at this -- since I'll have to change all numbers in the tests ( :D ), wouldn't it be useful to incorporate one other improvement I was wondering? In particular, Vizagrams may ask FreeType directly for the metrics of a whole string instead of pasting together individual glyphs. As the main benefit, that eliminates almost all metric errors (in this case mostly from kerning). With SVG output we can also (mostly) ignore issues like hinting, and thus the change should be able to get perfect text envelopes right away.

@davibarreira
Copy link
Owner

This sounds good! The way the package handles text is not ideal, as I did it mostly with the goal of getting it working for my thesis. When it comes to LaTeX, it is even worst. haha
If you manage a better solution, I'd be glad to incorporate it.

@exaexa
Copy link
Contributor Author

exaexa commented Jan 15, 2025

Haha yeah to simulate what LaTeX does you need to simulate Knuth, not really an option :D But the kerning (and ligatures, using the same trick) is not complex to handle and covers 99.999999% of cases where font rendering gets completely off.

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.

[solved] error on draw: NaN values are not allowed for HTML or SVG nodes: ...
2 participants