zalando / tech-radar

Visualizing our technology choices
https://opensource.zalando.com/tech-radar/
MIT License
1.66k stars 628 forks source link

Allow customization of font-family #143

Closed karras closed 5 months ago

karras commented 8 months ago

Currently the radar SVG has its font-family hardcoded, with this PR it becomes customizable.

I noticed that radar.css prefers Source Sans Pro for the surrounding text. Let me know if I should also adjust that or you'd like to handle it separately.

karras commented 8 months ago

@bocytko Any chance to get this merged? :)

bocytko commented 8 months ago

Currently the radar SVG has its font-family hardcoded, with this PR it becomes customizable.

Thanks for pointing out the missing configuration. What's the likelihood of a font-family change requiring a subsequent font-size change? In the end also the magic number offsets are related to the font sizes, which would complicate matters.

I noticed that radar.css prefers Source Sans Pro for the surrounding text. Let me know if I should also adjust that or you'd like to handle it separately.

Please open an issue for that and suggest how it could be achieved. If it does not end up being too ugly, I'd consider accepting a PR.

karras commented 8 months ago

Thanks for pointing out the missing configuration. What's the likelihood of a font-family change requiring a subsequent font-size change? In the end also the magic number offsets are related to the font sizes, which would complicate matters.

Good point, I guess with some font-families it might lead to issues, and as you pointed out making all the font-size combinations adjustable leads to more complexity. Maybe I could add a comment indicating that changing the font-family might lead to subsequent readability challenges ("change at your own risk")?

I noticed that radar.css prefers Source Sans Pro for the surrounding text. Let me know if I should also adjust that or you'd like to handle it separately.

Please open an issue for that and suggest how it could be achieved. If it does not end up being too ugly, I'd consider accepting a PR.

Here a short comparison between Arial and Source Sans Pro:

Arial

arial

Source Sans Pro

source_sans_pro

bocytko commented 8 months ago

Good point, I guess with some font-families it might lead to issues, and as you pointed out making all the font-size combinations adjustable leads to more complexity. Maybe I could add a comment indicating that changing the font-family might lead to subsequent readability challenges ("change at your own risk")?

Short comment sounds good. You can also mention 1-2 alternate font families that are compatible with current settings.

karras commented 7 months ago

Apologies for the delay, added a comment to the example in the README and defined a default value.

karras commented 6 months ago

@bocytko What do you think? Anything left to do from my side? :)

bocytko commented 5 months ago

@karras looks good now, thanks for the PR and your patience.