-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Description
Currently our font pickers don't know anything about system fonts:
By enabling and using the font access API we can provide suggestions for this which is really nice:
Unfortunately this doesn't work well currently when syncing across machines and/or using font fallbacks as warnings will appear. For example this is valid on this machine but it throws an error:
I've tried a few things but none of them work:
- The
exampleJSON schema property is what we're after, optional suggestions, but we don't seem to support it. - Using
pattern: '.*'in combination withenumstill warns about not matching an enum value. - This works but is a bit hacky to avoid matching both
oneOfvalues and it doesn't show up in the settings UI.anyOfdoesn't work:oneOf: [ { type: 'string', enum: fontFamilies, enumDescriptions: [`The system's default monospace font`], }, { type: 'string', pattern: `^(?!(${fontFamilies.join('|')})).*` } ]
Ideally any string value would be accepted and we would have a combobox in the settings editor to allow selecting from a dropdown or manual freeform entry.
@aeschli Am I interpreting example correctly and could we update the schema parsing to support it?
@roblourens @rzhao271 If we support example could we add a combobox renderer to the settings editor?




