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

Family-dependent font matching fallbacks? #1543

Open
Omikhleia opened this issue Aug 27, 2022 · 2 comments
Open

Family-dependent font matching fallbacks? #1543

Omikhleia opened this issue Aug 27, 2022 · 2 comments
Labels
enhancement Software improvement or feature request
Milestone

Comments

@Omikhleia
Copy link
Member

Unless I misunderstood the docs and my own tests, it seems \font:add-fallback adds the fallback font globally. If there are several fallback fonts that could provide missing characters in the current font at a point, the order in which one of those fallback is picked is not obvious.

I am looking at something similar to CSS font-family with its alternative list of fonts -- So that I could, for instance, set appropriate fallbacks for my main document font (say, a serif font matching it nicely), but other fallbacks for my title font (say, a sans-serif font), yet other appropriate fallback for my example fonts (say, another serif font, but where another fallback could look nicer). There could still be "general" fallback defaults in the end, but at least the picked font would depend on my choices if available.

Is it something that is doable with SILE?

@alerque
Copy link
Member

alerque commented Sep 1, 2022

Doable yes, currently implemented no.

I would like to add some sort of "family" group handling, not specifically for the same way you may want it but to make classes easier to customize. I already did this for CaSILE—styling a book involves setting a serif font and a sans font and a mono font and a display font (and for some designs, and decorative font, etc. It would be a lot easier if there was more upstream logic to handle these rather than passing everything though options inherited between commands.

Tying a fallback stack to current font settings makes a lot of sense to me.

1 similar comment
@alerque
Copy link
Member

alerque commented Sep 1, 2022

Doable yes, currently implemented no.

I would like to add some sort of "family" group handling, not specifically for the same way you may want it but to make classes easier to customize. I already did this for CaSILE—styling a book involves setting a serif font and a sans font and a mono font and a display font (and for some designs, and decorative font, etc. It would be a lot easier if there was more upstream logic to handle these rather than passing everything though options inherited between commands.

Tying a fallback stack to current font settings makes a lot of sense to me.

@alerque alerque added the enhancement Software improvement or feature request label Sep 1, 2022
@alerque alerque added this to the v0.14.x milestone Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Software improvement or feature request
Projects
None yet
Development

No branches or pull requests

2 participants