mintyfrankie / brilliant-CV-Submodule

Apache License 2.0
17 stars 16 forks source link

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

Closed munzirtaha closed 1 year ago

munzirtaha commented 1 year ago
> 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 commented 1 year ago

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 commented 1 year ago

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.