You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
would be helpful to have an option to the CLI to issue a warning if a requested font is not installed on the system. I understand that weasyprint uses fc-match to find a matching font in this case (which is great), but in cases users require an exact font match, it is cumbersome to check if all requested fonts are in the resulting pdf.
The text was updated successfully, but these errors were encountered:
Fonts defined in CSS never perfectly match with installed fonts, and it’s hard to agree on a reliable way to separate what’s OK and what’s not OK for users: do we accept case mismatches, ignore spaces/hyphens/underscores, check font weights, font styles, Unicode planes, filenames?
If we add a CLI option, we’ll have to deal with these different options, and that’s something we’d like to avoid. 😄
Hopefully, there are quite simple solutions to check that the fonts in your generated PDF correspond to what you want. For example, pdffonts, provided by Poppler, can list the fonts included in a PDF, and you can write a one-line command that warn you if the fonts you expect are missing.
That’s a little extra work for users, but it’s really more flexible in my opinion. I don’t know your use case (you can tell more about it if you want!), would that be a good solution for you?
Hi,
would be helpful to have an option to the CLI to issue a warning if a requested font is not installed on the system. I understand that weasyprint uses
fc-match
to find a matching font in this case (which is great), but in cases users require an exact font match, it is cumbersome to check if all requested fonts are in the resulting pdf.The text was updated successfully, but these errors were encountered: