Bug 126754 - FONT FEATURES DIALOG: Wrong OpenType tag for fractions in "font features" dialog
Summary: FONT FEATURES DIALOG: Wrong OpenType tag for fractions in "font features" dialog
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Character-Dialog
  Show dependency treegraph
 
Reported: 2019-08-07 21:09 UTC by RGB
Modified: 2019-12-06 07:26 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Font features menu (74.08 KB, image/png)
2019-08-07 21:09 UTC, RGB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description RGB 2019-08-07 21:09:24 UTC
Created attachment 153209 [details]
Font features menu

OpenType defines two kinds of fractions, the "diagonal" fraction with the +frac tag and the "nut" fraction with the tag +afrc

Character → Font tab → Features, LibreOffice offers "frac=1" for diagonal fractions and "frac=2" for nut fractions, which is wrong: those are Graphite tags, not OpenType tags, and they are valid only for Linux Libertine G and Linux Biolinum G fonts (Graphite tags are not standardized). 

Because of their similarity, LibreOffice understand both, "frac=1" and "frac=2" as just "frac" which apply the diagonal OpenType fraction.

This wrong preset also generates problems with font preview when using some fonts, because on 6.3 the "frac=1" is applied even if not explicitly selected by the user, as you can see in the attached screenshot. 

For the screenshot I'm using a font called Sukhumala that offer both, diagonal and (some) nut fractions: 

http://www.softerviews.org/Fonts.html#Sukhumala

Clearly, "frac=2" does not work to get nut fractions with Sukhumala, but "afrc" does.
Comment 1 BobBau 2019-08-14 16:00:19 UTC
If want you chose a styleset or something like "onum" or "pnum" from font feature menu automatically adds "frac=1" no matter if you have selected a feature or not.

So if you call up the menu item, this feature "frac=1" will be added.

I have testet it with font Fira Sans (original from Mozilla Foundation).
Comment 2 Heiko Tietze 2019-08-30 07:40:39 UTC
Don't see need for UX input (besides the UI, which is a different topic). Please add the keyword again if input is needed. 

Khaled, what do you think about the issue?
Comment 3 Tobias Hemm 2019-12-05 18:44:09 UTC
What RGB stated is absolutely correct.

I am about to file a bug/enhancement report regarding OpenType features, and have, in that course, found out that a newer version already contains a GUI implementation of them. So I have updated LO and tested the features.

And it is true: The fractions feature uses a wrong code (frac=1).
Furthermore, the default value is "diagonal", which doesn’t make sense.
This is a feature that should not be turned on by default.
Instead, there should be three values: "none", "diagonal" and "stacked".
(Please see my other report to see how I would implement it graphically.)
The code for "diagonal" would be "frac"; the code for "stacked" would be "afrc".
And I wouldn’t call the latter "nut" – that’s nuts.

At the moment, if I select the "nut fractions", what is created are diagonal fractions. As stated above, the default value is "diagonal", which creates no fractions at all.

But, guys, you are awesome to implement this, at all.
We will certainly get it to work properly.
Comment 4 Dieter 2019-12-06 07:26:50 UTC
(In reply to Tobias Hemm from comment #3)
> What RGB stated is absolutely correct.

=> Status NEW