Difference between revisions of "OpenTypeSupport"

From GIMP GUI Redesign
Jump to: navigation, search
m (added link)
(Add link to Inkscape issue for font-face)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
OpenType Fonts contain a number of features introduced to support specific use areas. SOme of these are:
+
OpenType Fonts contain a number of features introduced to support specific use areas. Some of these are:
  
 
* Multi-lingual text and Unicode;
 
* Multi-lingual text and Unicode;
Line 7: Line 7:
 
General principles for OpenType support in GIMP should include:
 
General principles for OpenType support in GIMP should include:
  
== Support ==
+
== Support every valid OpenType font ==
  
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.
  
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.
+
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. [https://wiki.inkscape.org/wiki/%40font-face_Support Inkscape wiki page for font-face support]
  
 
== Support all OpenType Functionality ==
 
== 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)
  
 
* a mechanism to access all encoded and alternate glyphs in a font
 
* a mechanism to access all encoded and alternate glyphs in a font
 
* specifying values for variable font axes (e.g. width, boldness, funkiness)
 
* specifying values for variable font axes (e.g. width, boldness, funkiness)
* specifying colours and gradients for colour fonts (e.g. COLR)
+
* 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
+
* 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 ==
 
== Saving and reusing settings ==
Line 30: Line 30:
 
== 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, 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.
+
This might be exposed, for example, by GIMP automatically 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.) 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).
 
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).

Latest revision as of 03:53, 2 January 2022

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

Font Search

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.

Choosing Settings

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.


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.