googlefonts / fontra

A browser-based font editor
https://fontra.xyz
GNU General Public License v3.0
508 stars 21 forks source link

set default source name #427

Closed GaetanBaehr closed 1 year ago

GaetanBaehr commented 1 year ago

When creating a new source would be nice to have a default source name based on the location of this source

as RoboCJK does here https://github.com/BlackFoundryCom/robo-cjk/blob/b99f24a2cb082954706d2b58ea5862b116dd5bac/sources/views/accordionViews.py#L1037

justvanrossum commented 1 year ago

Would it be an idea to omit the axes that are set to the default position?

justvanrossum commented 1 year ago

The RoboCJK suggested-source-name format is this:

wdth100_wght700

Since we often uses axes with a 0..1 range, I think it's valuable to keep one digit of precision (if it's there). So we'd get names like:

wdth0.8_wght0.3

The dot makes it less legible, though.

In other parts of Fontra, I use this format:

wdth=0.8,wght=0.3

I think this reads much nicer, with and without decimal:

wdth=100,wght=700

I would prefer this format.

@GaetanBaehr, what do you say?

justvanrossum commented 1 year ago

I merged the PR using my suggested format, but we can gladly discuss and change further.