Sematre / typst-letter-pro

DIN 5008 letter template for Typst
https://typst.app/universe/package/letter-pro/
MIT License
68 stars 2 forks source link

Add optional argument for font #2

Closed 3j14 closed 4 months ago

3j14 commented 4 months ago

I like your choice of Source Sans Pro as a neutral, sans serif font. However, sometimes it's nice to have some choice. Simply putting #set text(font: "Some other font") at the beginning of the document does not work as it will be overwritten in the template. Setting it in the body also does not work as it will only apply to the body.

I propose adding an optional option font to the template, with its default set to the current font – or alternatively drop the #set text(font: ...) entirely from the template. I personally prefer the first option.

If you'd like I'd be happy to provide a pull request later.

Sematre commented 4 months ago

Making is configurable is fine with me. But I would like to keep a default font that is compatible with automated letter processing software.

Deutsche Post for example does not recommend the following font styles: Screenshot from 2024-02-24 20-00-14 (from Deutsche Post / Automationsfähige Briefsendungen / Page 12)

They recommend the following fonts:

Standard fonts such as Arial, Frutiger, Helvetica, Times and Univers are easily machine-readable.

(from Deutsche Post / Automationsfähige Briefsendungen / Page 12)

That's the reason why I made Source Sans Pro the default for the letter-simple function.

3j14 commented 4 months ago

Oh, thanks for these resources! Thats super interesting!

I'll make the changes and create a pull request. Though not today, I'll probably do it by tomorrow.