LettError / designSpaceRoboFontExtension

A RoboFont extension for creating and editing designspace documents.
MIT License
27 stars 6 forks source link

Style linking names for instances #91

Open colinmford opened 4 weeks ago

colinmford commented 4 weeks ago

Hi @LettError —

In the DS5 spec there are additional names available other than what is shown in the instances tab.

https://fonttools.readthedocs.io/en/latest/designspaceLib/xml.html#instances-element

Most important of those, I think, are the stylemapfamilyname and stylemapstylename elements. These are quite useful for getting style linking to work in static fonts generated from the instances in a Designspace document. If they are left unset, the build tool just makes a best guess as to what NID 1 and 2 in the name table should be, and it could be wrong. I always find myself adding these names in the XML afterwards, which is fine for me but might be confusing for others.

It would be nice to have these names on the instance tab. If not in the table (I know it is quite crowded there and clutter should be kept to a minimum), maybe it could be the first tab on the "info" popup (which currently contains settings for localized names).

If this sounds like an idea you would like to see, I can make a PR to that effect.

LettError commented 4 weeks ago

I hear you. I know these names are useful to set if you're aiming for UFOs. I think there was some reluctance as the columns are crowded and there will be more values that one might need to be set. Weight and width values, if the interpolated numbers need to be adjusted. This is not to dismiss the request, but we need to think about where it should go. @typemytype what do you think?

typemytype commented 4 weeks ago

what if we move all the specific naming info to a table in the info section of a instance?

with additional button to generate and/or update them

image

instance location are from design process point of view more important, and pushing more the right or even hide them in a scroll is not so nice

LettError commented 4 weeks ago

Ok!

colinmford commented 4 weeks ago

I'm on it

typemytype commented 4 weeks ago

it happens here: https://github.com/LettError/designSpaceRoboFontExtension/blob/master/DesignspaceEditor2.roboFontExt/lib/designspaceEditor/ui.py#L556-L591

and not on ezui (yet.. )

colinmford commented 4 weeks ago

@typemytype @LettError Draft PR #92

typemytype commented 4 weeks ago

I remember again why its been left out:

Screenshot 2024-06-04 at 18 28 24

The newer instanceDescriptor label "can" support those values. But I guess it's good to have those values directly available in the UI.

LettError commented 4 weeks ago

I think Colin makes the case that not all designspaces will be variable fonts. Unless we want UFOOperator to also compile the STAT.

typemytype commented 4 weeks ago

no, an operator should not compile this (it has a preview through fontTools) but its good when those values are available