OpenType Fonts contain a number of features introduced to support specific use areas. Some of these are:
- Multi-lingual text and Unicode;
- Graphic design;
- Web needs, including bandwidth and security.
General principles for OpenType support in GIMP should include:
Support every valid OpenType font
You should be able to use any valid OpenType font on your system, regardless of its font name or file name, as long as GIMP has necessary file permissions. Valid here means, conforming to the OpenType specification, e.g. not corrupted or using a proprietary extension.
There is an Inkscape proposal for this, although i think a better approach than Pango support for font-face would be a Pango API to register a font file under a specific font name and ot refer to the font by name in attributes and Pango markup. Inkscape wiki page for font-face support
Support all OpenType Functionality
You should be able to use all OpenType functionality that the underlying font system supports (e.g. HarfBuzz/Pango), as far as possible in a platform-independent way. This must include (among other needs)
- a mechanism to access all encoded and alternate glyphs in a font
- specifying values for variable font axes (e.g. width, boldness, funkiness)
- specifying colours and (where supported) gradients for colour fonts (e.g. COLR)
- enabling/disabling Stylistic Sets and OpenType “Features” on spans of text, such as ligatures, pair kerning, language features, swash variants, small caps...
Saving and reusing settings
Provide a mechanism for users to save and recall sets of OpenType features, axis values, colour choices.
Note that LibreOffice does some of this using a URL-style syntax for font names, with a simple UI for users to check boxes or enter values being converted into URL parameters after the font name. See Here
Search for, or show, fonts that support a particular language or have a particular OpenType feature.
This might be exposed, for example, by GIMP automatically supplying appropriate tags for each font.
One approach consistent with the rest of GIMP (brushes, paint dynamics, gradients, etc.) might be to add a New Font From... button to the font chooser. This would bring up an Edit Font dock.
The Edit Font dock initially shows the font name and sample text (possibly taken from the actual font, or from the selected text on the canvas, or from a default fall-back string in a language the font supports).
There are then three notebook tabs, listed below. Under those there are Reset to Defaults, Delete, Save, Load Settings and Save Settings.
On Save, a new font-name is added to the font list encoding the chosen parameters, and with the name given by the user, if any, or the base font name plus parameters. If there is an active text selection, the new font shall be applied to it on Save.
Option: also add a "tags" field so the user can tag the new font directly.
This tab shows controls for enabling or disabling OpenType Font Features, grouped by feature.
(todo: provide example screen shot)
Explanatory text must be provided for each feature, along with sample text: for example, for ligatures this might include fi, ffl in English or French.
This tab shows the colour palette for the font, if applicable, with colour chooser buttons for each colour.
If gradients becomew idely supported in colour fonts, there must also be a way to specify gradients here.
This tab lists the axes the font supports, such as Italic Angle, with sliders that allow entry of exact values.
- Support accessing and setting the text with embedded (autogenerated) markup at a scripting level.
- The on-canvas controls must provide access to overriding features.