- Types of Smart Sets
- Smart Set locations
- Smart Set data format
- Editing Smart Sets
- Query strings
- Smart Sets vs. Groups
Smart Sets are an interface for visualizing collections of glyphs in the Font Overview.
Types of Smart Sets
Smart Sets can be of two different types:
- List-based Smart Sets
Static sets defined by a list of glyph names.
Identified by a list icon.
- Query-based Smart Sets
Dynamic sets defined by a query.
Identified by a gear icon.
Smart Set locations
Smart Sets can be stored in two different places:
- Default Sets
Stored in the application defaults.
Available for all open fonts.
- Font Sets
Stored in the font lib under a custom key:
Available only for this font.
Smart Set data format
A Smart Set is defined as a list of dicts.
Each dict in the list must follow the format below:
||The name of the smart set as a string. required|
||The query as a string. required|
||Indicates that the Smart Set contains a list of glyph names (a string). The query is still required. optional|
||Indicates that the Smart Set is a folder (a list of Smart Sets dicts). optional|
||Each set needs a unique key, which is stored in the Smart Set. autogenerated if not present|
Editing Smart Sets
There are multiple ways to edit Smart Sets data:
By double-clicking a set in the Smart Sets panel. This will open a sheet with a list of glyph names (for list-based sets) or the Search Glyphs panel (for query-based sets).
.robofontSetsfiles using the options menu, or by dropping a
.robofontSetsfile on top of one of the headers (Defaults Sets or Font Sets).
By manipulating the data with code using the
By manipulating the Smart Sets data directly in the
ufo.libor in the application defaults. (not recommended)
The attribute names used to build the queries are the same as the names displayed in the Search Glyph panel’s glyph attributes menu, without spaces.
Here is an example query string:
Name CONTAINS ‘foo’ OR Contours >= 5 AND Unicode > 1234
This query will return all glyphs with a name containing
foo or all glyphs with more than 4 contours and a unicode value bigger than
Smart Sets vs. Groups
Smart Sets are similar in concept to groups: both represent collections of glyphs.
The table below outlines the main differences between groups and Smart Sets:
|implementation||defined in the UFO format and in the FontParts Object map||a special feature provided by RoboFont|
|data storage||stored in
||stored in the application or in the
|glyphs||defined as a list of glyph names||defined as a list of glyph names or as a search query|
|interface||edited using the Groups sheet, which is modal||edited within the Font Overview, works like a search performed with the Search Glyphs panel|
To convert a Smart Set into a group, choose Export to a Font Group from the options menu at the bottom left of the Smart Sets panel.