-
-
Notifications
You must be signed in to change notification settings - Fork 952
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
Also select font via unprettified family name #2098
Comments
I can take a look at this. I kinda familiarized myself with the fonts while investigating #2917. If the maintainers are willing, let's open a Forge thread? |
I'll open one. |
Maybe related: there seems to be no way to select font by size. For example,
uses an 8pt font:
but I do have a "Latin Modern Sans" in 17pt installed:
In fact, it seems typst finds all of these fonts:
But it will only use the 8pt font Note that the 17pt font is not the same as the 8pt scaled to 17pt (which is what typst produces). |
With Roboto and Roboto Condensed installed there's no way to select a specific variant. https://fonts.google.com/specimen/Roboto https://fonts.google.com/specimen/Roboto+Condensed
Note that Roboto Condensed is a variable font so even though it's only showing up at weight=400, it's valid for any weight. Being able to select a weight by name is also be a nice to have and that would be captured by the PostScript name. Fonts like e.g. Bell Centennial have non-standard names (Address, Name & Number, Sub-Caption, Bold Listing) for their weights and it would be nice to not have to manually map them to numeric values. Others like FF Meta have two variants at the same weight with different names. |
you might want also to look at my ticket #5455 |
Currently, I worked around this issue by ignoring the system fonts, and supplying my own specific font files. typst compile resume.typ --font-path ./Fonts/ --ignore-system-fonts My specific file structure
Yes, there is font duplication now, but the additional advantage of this (aside from it working) is that other devices can compile it as well, without having to have those fonts installed. |
if i remember correctly, variable font files are not valid for pdf embedding. |
Roboto should be available in a non variable version and I would use that instead as variable fonts have limited support for now. Roboto vs Roboto Condensed comes down to As of Related, I've not had the bandwidth recently to finish up the PANOSE support (harfbuzz/ttf-parser#172), so some older fonts are still out of luck if their Short term the more more correct end-user fix is to use the static version of Roboto and add an exception to https://github.com/typst/typst/blob/main/crates/typst-library/src/text/font/exceptions.rs |
let me add a reality check here – i recently bought a commercial grade font-bundle from a german manufacturer targetted at the SMB/KMU market. 1 - non of the files contains a STAT table. 2 - using (version 0.12.0)
for
3 - i also took a "Pro" version font family to the test:
for
i am willing to work with the manufacturer to fix their fonts – what should i tell them exactly ? |
@terefang Whoever sold you those fonts should fix them. As of 0.25 For diagnostic information start here: |
That said I think a mechanism to select a font by its Postscript name would be a big win. |
let me add:
|
Right, see my comment above for information on how to get more detailed information from your fonts. |
yeah ... but what about if the fonts cannot be fixed because of complex licensing issues ? then it would make sense to have something in place like i proposed in #5455 |
do you suggest that i need to install a complete rust dev environment just to get the debugging utility ? which has build errors btw |
maybe a more common tool could be used like ttfdump ?
looks like the |
Description
Typst prettifies some font names, but ideally the true name should also work, that is, in the example below both line 2 and 3 should render in New CM.
Moreover, conceivably a font could be selectable via full name or perhaps also PostScript name:
Use Case
More compatibility.
The text was updated successfully, but these errors were encountered: