googlefonts / ufo2ft

A bridge from UFOs to FontTools objects (and therefore, OTFs and TTFs).
MIT License
152 stars 43 forks source link

Add inter-layer or whole UFO filter mechanism? #589

Open madig opened 2 years ago

madig commented 2 years ago

Primary use-case: convert Glyphs.app bracket layers and insert rules into Designspace on the fly during compilation so we can delete the BRACKET handling hack in glyphsLib.

I'm sure I though of this before but can't remember the details.

anthrotype commented 2 years ago

another use case for this is interpolatable cu2qu which must be done on all masters at once, not per master (we currently call cu2qu.fonts_to_quadratic instead of a per-layer filter like we do for non-interpolatable builds)

madig commented 2 years ago

Random idea: during the design stage, a filter fills in empty zero-width glyphs (or some predefined one like notdef) for the ASCII range that don't exist so that testing something somewhere does not use fallback glyphs from a different font.

Or: You're designing a VF and the filter fills in the glyph from the default source unless you explicitly created it in another source already (could make it easier to make compatible sources and not drown in Git noise). This could also help with a certain secret project where not all scripts are present in all sources.

Although there should be a line between 1. Useful for font developmennt in general and 2. This should be part of the build system.

madig commented 2 years ago

Another use case: decomposing transformed components, but compatibly (i.e. decompose in all if transformed in one source).