Difference between revisions of "OpenTypeSupport"

From GIMP GUI Redesign
Jump to: navigation, search
m (added link)
Line 26: Line 26:
 
Provide a mechanism for users to save and recall sets of OpenType features, axis values, colour choices.
 
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.
+
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 [https://wiki.documentfoundation.org/Smart_font_optional_features_for_Graphite_and_OpenType_fonts/en Here]
  
 
== Font Search ==
 
== Font Search ==
Line 36: Line 36:
 
= Choosing Settings =
 
= Choosing Settings =
  
One approach consistent with the rest of GIMP (brushes, paint dynamics, gradients, etc.) would be to add a New Font From... button to the font chooser. This will bring up the Edit Font dock.
+
One approach consistent with the rest of GIMP (brushes, paint dynamics, gradients, etc.) would be to add a New Font From... button to the font chooser. This will bring up the 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).
 
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).

Revision as of 16:34, 13 November 2021

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.

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 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

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

Font Search

Search for, or show only, fonts that support a particular language or have a particular OpenType feature.

This might be exposed, for example, by GIMP supplying appropriate tags for each font.

Choosing Settings

One approach consistent with the rest of GIMP (brushes, paint dynamics, gradients, etc.) would be to add a New Font From... button to the font chooser. This will bring up the 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.


Features

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.

Colours

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.

Variable Axes

This tab lists the axes the font supports, such as Italic Angle, with sliders that allow entry of exact values.

Accessing Features

  • Support accessing and setting the text with embedded (autogenerated) markup at a scripting level.
  • The on-canvas controls must provide access to overriding features.