Difference between revisions of "OpenTypeSupport"

From GIMP GUI Redesign
Jump to: navigation, search
(an initial attempt at opentype feature support)
 
Line 7: Line 7:
 
General principles for OpenType support in GIMP should include:
 
General principles for OpenType support in GIMP should include:
  
== Support every valid OpenType font
+
== 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.
 
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 Funtionality
+
== 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)
 
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)
Line 20: Line 22:
 
* enabling/disabling Stylistic Sets and OpenType “Features” on spans of text, such as ligatures, pair kerning, language features
 
* enabling/disabling Stylistic Sets and OpenType “Features” on spans of text, such as ligatures, pair kerning, language features
  
== Saving and reusing settings
+
== Saving and reusing settings ==
  
 
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.
Line 26: Line 28:
 
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.
  
== Font Search
+
== Font Search ==
  
 
Search for, or show only, fonts that support a particular language or have a particular OpenType feature.
 
Search for, or show only, fonts that support a particular language or have a particular OpenType feature.
Line 32: Line 34:
 
This might be exposed, for example, by GIMP supplying appropriate tags for each font.
 
This might be exposed, for example, by GIMP supplying appropriate tags for each font.
  
= 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.
Line 45: Line 47:
  
  
== Features
+
== Features ==
  
 
This tab shows controls for enabling or disabling  OpenType Font Features, grouped by feature.
 
This tab shows controls for enabling or disabling  OpenType Font Features, grouped by feature.
Line 53: Line 55:
 
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.
 
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
+
== Colours ==
  
 
This tab shows the colour palette for the font, if applicable, with colour chooser buttons for each colour.
 
This tab shows the colour palette for the font, if applicable, with colour chooser buttons for each colour.
Line 59: Line 61:
 
If gradients becomew  idely supported in colour fonts, there must also be a way to specify gradients here.
 
If gradients becomew  idely supported in colour fonts, there must also be a way to specify gradients here.
  
== Variable Axes
+
== Variable Axes ==
  
 
This tab lists the axes the font supports, such as Italic Angle, with sliders that allow entry of exact values.
 
This tab lists the axes the font supports, such as Italic Angle, with sliders that allow entry of exact values.
  
= Accessing Features
+
= Accessing Features =
  
 
* Support accessing and setting the text with embedded (autogenerated) markup at a scripting level.
 
* Support accessing and setting the text with embedded (autogenerated) markup at a scripting level.
  
 
* The on-canvas controls must provide access to overriding features.
 
* The on-canvas controls must provide access to overriding features.

Revision as of 16:22, 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.

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.