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

Allow customization of font-family #143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

karras
Copy link
Contributor

@karras karras commented Mar 12, 2024

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
Copy link
Contributor Author

karras commented Mar 25, 2024

@bocytko Any chance to get this merged? :)

@bocytko
Copy link
Member

bocytko commented Apr 2, 2024

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
Copy link
Contributor Author

karras commented Apr 3, 2024

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

docs/radar.js Show resolved Hide resolved
@bocytko
Copy link
Member

bocytko commented Apr 3, 2024

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 karras force-pushed the feat_customize_font_family branch from ede9ade to 3749a97 Compare April 15, 2024 14:42
@karras karras force-pushed the feat_customize_font_family branch from 3749a97 to 3615a4c Compare April 15, 2024 14:53
@karras
Copy link
Contributor Author

karras commented Apr 15, 2024

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

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 this pull request may close these issues.

None yet

3 participants