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

Setting the font 20 times to use 3 fonts is redundant #3

Closed
munzirtaha opened this issue Jun 6, 2023 · 2 comments · Fixed by #4
Closed

Setting the font 20 times to use 3 fonts is redundant #3

munzirtaha opened this issue Jun 6, 2023 · 2 comments · Fixed by #4

Comments

@munzirtaha
Copy link
Contributor

munzirtaha commented Jun 6, 2023

> rg -i font awesomeCV/template.typ
9:  set text(font: "Source Sans Pro")
66:#let headerFont = "Roboto"
67:#let bodyFont = "Source Sans Pro"
74:  font: headerFont,
82:  font: headerFont,
89:  font: (bodyFont, "Font Awesome 6 Brands", "Font Awesome 6 Free"),
96:  font: bodyFont,
104:  font: bodyFont, 
112:  font: bodyFont,
120:  font: bodyFont,
129:  font: bodyFont,
137:  font: bodyFont,
146:  font: bodyFont,
157:  font: bodyFont,
164:  font: bodyFont,
171:  font: bodyFont,
178:  font: bodyFont,
185:  font: bodyFont,
192:  font: bodyFont,
201:  font: bodyFont,
209:  font: bodyFont,
216:  font: bodyFont,

The CV is mainly using 2 or 3 fonts, so setting the font twice could be enough. If you are open to the idea, I can test and provide a PR

@mintyfrankie
Copy link
Owner

Hi @munzirtaha,

It might be indeed redundant but I think it would be easier for users to change the styles for each Style variable, without getting all the stuff hardcoded or coupled.

Feel free to submit a PR and we'll see if it is better!

@munzirtaha
Copy link
Contributor Author

My argument would be, if someone needs to change fonts for each section, one has to edit that section and hard code it, anyway. Though not recommended, these kind of changes can be explained in documentation instead of polluting the code.

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

Successfully merging a pull request may close this issue.

2 participants