huertatipografica / HTLetterspacer

HT Letterspacer is a tool for spacing fonts
https://huertatipografica.github.io/HTLetterspacer/
GNU General Public License v3.0
73 stars 16 forks source link

Idea: Per-glyph parameters? #37

Open madig opened 6 years ago

madig commented 6 years ago

Some glyphs, like 'l' with a tail, may need a slighlty higher paramDepth relative to the rest to look good. The configuration allows for spacing scaling on a filter basis, but I can't seem to say "apply a depth of 20 to l". The idea is to be able to mindlessly apply the script to the whole font whenever needed without remembering to apply other parameters to 'l'.

andrestelex commented 6 years ago

I think it is possible and very useful to store specific parameters in userData

layer.userData['paramArea'] = 400

I also think we can use this to force glyphs to change categories, in order to change the behavior (usually I want specific symbols to behave like letters)

font.glyphs['ampersand'].userData['category'] = 'Letter' font.glyphs['ampersand'].userData['subCategory'] = 'Uppercase'

Whatever is in userData will override the global config. The main problem about this is how to to set up and read this information in a friendly way. To set it up in glyphs I can imagine more options in the UI. But how to access the information and make it clear for most users? I'm open to ideas to make this work in the UI.

Danke schön, mein freund. :)