philipbelesky / inter-ui

A npm package for distributing the Inter font family created by Rasmus Andersson.
https://github.com/rsms/inter/
SIL Open Font License 1.1
111 stars 6 forks source link

Make variable font suffix configurable #27

Closed kraftner closed 3 years ago

kraftner commented 3 years ago

I also just ran into #17. I understand that changing the name causing a breaking change isn't great. So, as an alternative, what would you think about making the suffix configurable while keeping the default of .var? This way one those who want can change it but the default stays the same.

So for example instead of

src: url("#{$inter-font-path}/Inter-roman.var.woff2#{$inter-font-path-suffix}") format("woff2 supports variations(gvar)"),

it could be

$inter-font-variable-suffix: '.var' !default;

src: url("#{$inter-font-path}/Inter-roman#{$inter-font-variable-suffix}.woff2#{$inter-font-path-suffix}") format("woff2 supports variations(gvar)"),

If this is something you would accept I'd be happy to follow up with a PR.

philipbelesky commented 3 years ago

Hi kraftner, thanks for the suggestion and sorry for the delay getting back to you. A configurable value with a default that doesn't break the current path is a great solution! Please do go ahead with a PR.

kraftner commented 3 years ago

Great, PR waiting for your approval.

I also updated the Readme to mention the alternative approach, I hope the wording suits you.