Opentype features now enabled? Documentation?

According to a recent comment on the long-running “bug”, #58941, Opentype features are now supported in LibO:

comment screenshot

Questions:

  • Does anyone know which version this update appears in?
  • Is there any documentation on how LibO’s Graphite features are accessed (given the comment!) – I am aware of the documentation for Graphite-enabled Linux Libertine & Biolinum. Is it the same?

FWIW: I’m currently using Version: 5.2.3.2 / Build ID: 1:5.2.3~rc2-0ubuntu1~xenial1, but can’t coax/control OpenType features using the Linux Libertine G “syntax”.

The toolbar seems to work in 32 bits LO 5.2.3 on Windows 10, haven’t tried all options.

@floris-v Which toolbar? Can you post as an answer with examples (e.g., turning off/on a selected opentype feature)? Thanks!

The Typography toolbar, of course. You can enter text, ligatures will be applied, but you can turn that off for selected text. It automatically makes diagonal fractions, you have to type 1/2 and click Nut fractions to get those. Apparently you can’t toggle settings on the toolbar, but it’s a start.

@floris-v The typography toolbar is for the Linux Libertine/Biolinum G fonts only: it doesn’t work on Gentium Plus or any other Graphite font (the graphite tags are different), let alone OpenType ones. In fact, it is not maintained any more.

OpenType sopport is a completely different beast. AFAIK, the main problem here is lack of support on ODF, but considering that Graphite support is kind of an ODF hack too… let’s see what happens!

@dajare Each Graphite font have its own set of “tags” to toggle the smart font features: you need to check the font documentation. In a nutshell: you need to add a tag and a parameter to the font name, something like

Linux Libertine G:smcp=1

will enable the small caps feature for Linux Libertine G.

@RGB-es Thanks for that – you might have noticed I linked to the documentation for the Linux Lib&Bio G fonts in the question already… :wink:

@floris-v As another commenter noted, the typography toolbar is an extension, and does not ship with LibO. But we’ll see what news there is when 5.3 is released. Thanks anyway.

Okay, I got the point, mixed things up. Sorry about that.

OK, Just downloaded a daily build for 5.3 alpha and tried a couple of things and… IT WORKS!!!

The text is set on a decorative font called Kleymissky. Both lines have exactly the same text, but on the second one the font is set as

Kleymissky:ss01

which activates the first stylistic set, changing the numbers into those symbols. For a list of OpenType tags you can check Dario Taraborelli’s page.

As expected, if you save the file and then open it on 5.2.2, the tag is ignored, but open it again in 5.3 and you get it! YES!!!

There’s a big W00t!! Thanks for the test, report, and links. Good news!

Congratulations!

It is LibreOffice 5.3 which brings OpenType feature support. See the “Text Layout” section of the LibreOffice 5.3 release notes. “OpenType layout features can be controlled using the syntax previously only supported for Graphite fonts.”

Here’s a summary of the syntax:

  1. OpenType features are activated by add special codes to the end of the font name.
  2. Where you have UI that you can select a font from a pop-up menu, you likely can also type the font name. Two useful locations are:
  • the Font Name area in the Formatting toolbar,
  • the three Font Name selectors in the Character formatting dialogue, reached via menu item FormatCharacter…, then selecting the Font tab
  • the three Font Name selectors in the Paragraph Style formatting dialogue, reached via menu item Styles and Formatting, then right-clicking on a Style name, selecting Modify… from the popup menu,then selecting the Font tab
  • the Font Name area in the Properties sidebar,
  1. In those locations, select the font name, then click in the font name. A cursor appears. Use right-arrow to move to the end of the font name. Type “:” and the first code. Click OK or however you commit the change. The document will redraw, with features applied.
  2. The code consists of a 4-character “tag”, with notation before or after it. Just the tag means “activate this feature”, e.g. onum activates old-style numbers. A minus in front of the tag means “deactivate this feature”. The tag followed by “=” then an integer means “assign the integer value to the tag for layout purposes”, e.g. frac=1 enables arbitrary (diagonal) fractions, while frac=2 enables precomposed (nut) fractions.
  3. You can add multiple codes after the first code. To add a code, insert “&” as a separator, then the next code. e.g. :onum=1&pnum=1 activates both the Oldstyle Figures and Proportional Figures features.
  4. The authoritative list of OpenType feature tags is at https://www.microsoft.com/typography/otspec/featuretags.htm . Some fonts may define their own feature tags using the OpenType or Graphite mechanisms, e.g. http://www.numbertext.org/linux/fontfeatures.pdf . You might find that trying to figure out which fonts work with which tags on which versions of LO will be a bit of a mess. Sorry.
  5. Be aware that OpenType, and Graphite, and Apple Advanced Typography (AAT) are three different systems for defining how an application like LibreOffice should interact with a font to make text layout happen. They share common font structures, but the tag names and expected behaviour are different. This makes things more complicated. Sorry.

(Note to reader: I probably left something out of this, or stated it wrongly. Please improve this answer as we all learn more.)

It seems that this feature will appear with the 5.3 release – currently scheduled for the end of January 2017 – and brings with it some other welcome developments. If anyone would like to try it now, this feature is already in the daily development builds.

And regarding documentation, here is a further update from the ongoing comments to the bug report thread:

The official OpenType feature registry is:
https://www.microsoft.com/typography/otspec/featuretags.htm
Basically any feature listed there is supported.

HT: Khaled Hosny