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

Support variable fonts #185

Open
LdBeth opened this issue Mar 23, 2023 · 7 comments
Open

Support variable fonts #185

LdBeth opened this issue Mar 23, 2023 · 7 comments
Labels
feature request New feature or request pdf Related to PDF export text Text layout, shaping, internationalization, etc.

Comments

@LdBeth
Copy link

LdBeth commented Mar 23, 2023

for example, https://fonts.google.com/specimen/Bitter, if have the variable font version Bitter-VariableFont_wght.ttf installed, selecting font weight by #set text(font: "Bitter", weight: "medium") would still render the ExtraLight variant and setting other weight options would not change the font weight appeared in the PDF output anyway.

@owiecc
Copy link
Sponsor Contributor

owiecc commented Mar 24, 2023

Same here. With these fonts:

QuadraatPro.otf
QuadraatPro-Ita.otf
QuadraatPro-Demibold.otf
QuadraatPro-DemiboldItalic.otf
QuadraatPro-Bold.otf
QuadraatPro-BoldIta.otf

#set text(font: "Quadraat Pro") selects Quadraat Pro Italic. I did not manage to get the Regular style. Names in the system are: Regular, Italic, Demibold, Demibold Italic, Bold, Bold Italic.

@reknih reknih changed the title Having trouble select weight for variable font Support variable fonts Apr 4, 2023
@reknih reknih added feature request New feature or request pdf Related to PDF export text Text layout, shaping, internationalization, etc. labels Apr 4, 2023
@reknih
Copy link
Member

reknih commented Apr 4, 2023

Typst does not support variable fonts at the moment. They could be a good addition.

@owiecc This is an unrelated bug on normal font discovery. I will file a separate issue.

@mattfbacon
Copy link
Contributor

What is missing here? Is any current work addressing this?

@laurmaedje
Copy link
Member

There is no current work. Supporting variable fonts is a major effort. It needs large changes to the font handling and to the PDF export.

@davelab6
Copy link

@laurmaedje I work on the Google Fonts team and I'm a big proponent for variable fonts. If you want any free consulting advice on this topic, please reach out to me or [email protected] :) I wrote a little about this for the Flutter team here

@laurmaedje
Copy link
Member

@davelab6 Thanks for the offer! We'll get back to it when we start work on variable fonts.

@davelab6
Copy link

davelab6 commented Aug 6, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request pdf Related to PDF export text Text layout, shaping, internationalization, etc.
Projects
None yet
Development

No branches or pull requests

6 participants