Bug 132927 - Error in producing oldstyle numbers from menu Font Properties
Summary: Error in producing oldstyle numbers from menu Font Properties
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.4.1 rc
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Font-Rendering
  Show dependency treegraph
 
Reported: 2020-05-10 17:24 UTC by samiel
Modified: 2020-07-19 16:16 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Results of testing (13.63 KB, application/vnd.oasis.opendocument.text)
2020-05-14 17:38 UTC, Dieter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description samiel 2020-05-10 17:24:39 UTC
Description:
I have several fonts .otf with (true) small caps, and I can select from the menu Format - Font - Font type - Properties the .otf features that interest me. Now, when I choose the item "elzeviri numbers" (this in Italian version: they are oldstyle numbers), since the item "Style Fractions: Diagonal fractions / Vertical fractions" can never be deselected, the system produces in the font window the string <:frac=1&onum>. It would seem correct, but in reality the numbers I type result normal capital numbers in superscript, and not oldstyle numbers.

Steps to Reproduce:
1. menu Format - Font - Font type - Properties
2. check "elzevir [oldstle] numbers"
3. Press OK
4. come back and write...


I choose the item "elzeviri numbers" (this in Italian version: they are oldstyle numbers), since the item "Style Fractions: Diagonal fractions / Vertical fractions" can never be deselected, the system produces in the font window the string <:frac=1&onum>. It would seem correct, but in reality the numbers I type result normal linig numbers in superscript, and not small caps numbers.

Actual Results:
Not oldstyle numbers are producted, but lining superscript numbers

Expected Results:
Lining superscript numbers are producted


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Produce oldstyle numbers
Comment 1 samiel 2020-05-10 18:15:59 UTC
The problem perhaps arises from the incorrect setting of the fractions.
In the menu there is no way to disable it, because it only allows you to choose between horizontal and diagonal fractions.
Evidently, when I type a number, Writer erroneously expects it to be always the numerator of a fraction.
Comment 2 V Stuart Foote 2020-05-10 18:47:43 UTC
IIUC, would expect the diagonal/vertical fractions to only change for those Unicode glyphs the font actually has coverage of.

Check the font's OTF/Graphite feature entering these code points (using the <Alt>+X convert):

U+00bc -- 1/4
U+00bd -- 1/2
U+00be -- 3/4

with the block U+2150-U+215f (1/7, 1/9, 1/10, 1/3, 2/3, 1/5, 2/5, 3/5, 4/5, 1/6, 5/6, 1/8, 3/8, 5/8, 7/8, and 1/ respective).

Those glyphs should be covered with the diagonal - vertical feature.

Not sure, but also check using the U+2040 -- solidus for constructing diagonal fraction. And with that, numbers in the Small caps should show alternates allowing creation of additional fractions to match the diagonal/vertical alternates.
Comment 3 samiel 2020-05-10 19:38:34 UTC
My font has the lookups to generate any diagonal fraction: infact choosing <:frac=1> or <:frac=2> generates the right (and only) fraction allowed by .otf (even 123/987 ...). Not only the glyphs expected by Unicode. It works fine with LibreOffice. My very trouble is with <:onum>, if I chose it from the Font Properties menu. The problem of fractions was only a hypothesis as to why the insertion of old-style numbers fails
Comment 4 samiel 2020-05-10 19:44:09 UTC
You can see in the attached .png.
In red the numbers, that would be oldstyle numbers,
but in effect are denominators

https://ibb.co/wpYDwrH
Comment 5 Dieter 2020-05-14 11:10:19 UTC
(In reply to samiel from comment #0)
> Description:
> I have several fonts .otf with (true) small caps, and I can select from the
> menu Format - Font - Font type - Properties the .otf features that interest
> me.

I would try to reproduce the bug, but I don't know, which font do you use. I also can't find the entries you've mentioned, but I think it is Format => Character => Font tab => Features
Comment 6 samiel 2020-05-14 12:29:07 UTC
The bug occurs with fonts that contain lookups for arbitrary fractions and old-style numbers. You can easily verify this with the command:
otfinfo -f
For example, referring to Adobe Garamond Premier Pro, I obtain:

============================================
otfinfo -f GaramondPremrPro.otf 

aalt	Access All Alternates
c2sc	Small Capitals From Capitals
calt	Contextual Alternates
case	Case-Sensitive Forms
cpsp	Capital Spacing
dlig	Discretionary Ligatures
dnom	Denominators
frac	Fractions             <-----   
hist	Historical Forms
kern	Kerning
liga	Standard Ligatures
lnum	Lining Figures
numr	Numerators
onum	Oldstyle Figures      <-----
ordn	Ordinals
ornm	Ornaments
pnum	Proportional Figures
salt	Stylistic Alternates
sinf	Scientific Inferiors
size	Optical Size
smcp	Small Capitals
ss01	Stylistic Set 1
ss02	Stylistic Set 2
ss03	Stylistic Set 3
ss04	Stylistic Set 4
subs	Subscript
sups	Superscript
tnum	Tabular Figures
zero	Slashed Zero
============================================

@Dieter
Yes, the entry is that one - I tried an English translation from my Italian layout ...

See the attachment, where I use various font:

https://ibb.co/gyhzbBg

In the last example (that of Linux Libertine) it is clear that the numbers are in any case intended as fractions. If only one number is entered, as a numerator; if a second is entered, as denominator. If after entering the digit of the number 2 I had hit the space bar, I would not have got the number 12, but the fraction 1/2.
Comment 7 Dieter 2020-05-14 17:38:05 UTC
Created attachment 160830 [details]
Results of testing

I've made some test wih the following results:

a) It's no problem to deselect Style Fraction (change it to none)
b) There are different results (see attachment) for different fonts.

So I'm not really sure about the conclusion. What do you think, Samiel?
Comment 8 samiel 2020-05-14 18:49:24 UTC
In the menu I've only (LibreOffice 6.4.4 rc1 on Linux DEbian with Cinnamon)
Vertical Fractions (or vulgar fractions) and Horizontal Fraction (or nut fractions).
No possibility to choose None from the menu.
I can only manually delete the string relative to fractions in the font windows.

I used your file and confirm what I'n saying:
setting <:frac=1&onum> in the font having both features,
I'm not able to write old style number
Comment 9 Dieter 2020-05-15 07:02:17 UTC
(In reply to samiel from comment #8)
> No possibility to choose None from the menu.

So perhaps we should reduce this bug report to that problem?
Comment 10 samiel 2020-05-15 12:33:29 UTC
I have encountered the problems that I have listed. 1) numbers always treated as fractions; 2) consequent impossibility of inserting old-style numbers. I am unable to say what exact relationship there is between these two problems.
As for the inability to deselect the Fractions box, it could be a limit. But the user should have the ability to activate both together and that is to have both fractions and the oldstyle numbers. Which moreover is easily feasible for example with LaTeX.
Not being a computer scientist, I also miss the exact nature of the problems and the possible relationships between one problem and another ...
Comment 11 Dieter 2020-05-15 12:52:49 UTC
(In reply to samiel from comment #10)
> Not being a computer scientist, I also miss the exact nature of the problems
> and the possible relationships between one problem and another ...

I'm also not a developer. But since there is one basic rule in Bugzilla "One problem - one bug report" it would be better to open one report for each problem. You can connect them by adding bug number in "See also".
Comment 12 V Stuart Foote 2020-05-15 13:35:46 UTC
We use a Graphite flavored SIL implementation for HarfBuzz handling of OpenType font features. Would be curious as to handling of number fractions and alternate forms taken from a Graphite font?

A check of Libertine Display G where the Graphite frac attribute responds to its selections of 'none','diagonal','nut' fractions. And seems to use the old-style variants in fractions when selected with the frac attribute set 'none'.
Comment 13 samiel 2020-05-15 13:56:06 UTC
At present I'm rather busy, later I'll try to handling the bug report

@VStuartFoote
I'm not an expert aaaabout Graphite, I only know that there were few fonts with Graphite support, while now the otf is the standard. In any case, I try to find out
SilGraphite is not deprecated?
Comment 14 samiel 2020-05-15 20:24:52 UTC
I reported as a bug:
It's impossible to deselect "Fraction" from the Font menu:
https://bugs.documentfoundation.org/show_bug.cgi?id=133073
Comment 15 V Stuart Foote 2020-05-15 22:02:33 UTC
Please retest with a flatpak or parallel install of nightly master/7.0.0alpha1+

The None selection for OTF corrected for bug 132242 (i.e. issue of your dupe 133073).
Comment 16 samiel 2020-05-29 22:15:33 UTC
Is there no AppImage?
Comment 17 V Stuart Foote 2020-05-29 22:37:56 UTC
(In reply to samiel from comment #16)
> Is there no AppImage?

https://www.libreoffice.org/download/appimage/
Comment 18 samiel 2020-07-02 21:23:38 UTC
but the appimages are all of 6 version, not 7 !
Comment 19 V Stuart Foote 2020-07-02 21:37:54 UTC
AppImage of daily master/7.1.0 are here: 
https://libreoffice.soluzioniopen.com/index.php/daily-version/

AppImage of 7.0.0 pre-releases (looks to be lagging) are here:
https://libreoffice.soluzioniopen.com/index.php/7-0-pre-releases/
Comment 20 samiel 2020-07-02 22:19:00 UTC
Thank you!
the bug appears to have been fixed. now there is also the option: Fractions: none