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

Auto load fonts on demand #634

Open
aszenz opened this issue Jan 20, 2025 · 1 comment
Open

Auto load fonts on demand #634

aszenz opened this issue Jan 20, 2025 · 1 comment

Comments

@aszenz
Copy link

aszenz commented Jan 20, 2025

Is your feature request related to a problem? Please describe.

Using different fonts in a template is currently difficult. As a developer using this library idk which fonts my users are going to use in their templates.

Users can use different fonts in their templates, and it's hard to know ahead of time which fonts are required to render the template, loading all the supported fonts is inefficient.

Describe the solution you'd like

Download/load selected fonts on demand.

Let's say the user has typed #set text(font: "Arial", size: 10pt, hyphenate: true) in their template, when compiling try to download and load the Arial font from a configurable server endpoint (default to Google fonts).

Describe alternatives you've considered

  • A separate method to extract fonts used in a template that the user can then preload.

Additional context

I'm building an app to render invoice templates for different customers, they will use commonly used fonts.

@cog25
Copy link

cog25 commented Feb 3, 2025

Related: #412

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

2 participants