Diacritics, and especially macrons (¯) seems to be mispositionned, depending on font and font size. The glyph n̄ in particular often has a misplaced macron.
My first guess would be there is a rounding error on the vertical positioning. But it's not explaining the issue on the horizontal positioning on the 'n' (which may be explained because it's not usual to have a macron on it).
But in the end, _at least_, having the macrons on the vowels not being consistent is an issue.
Note that :
* That bug has been reported to me by a linguist who needed a clean display of macrons, but this report is based on my machine. All that to say, I'm not alone, and there is a use case for it.
* It has been reported in Impress too (but I haven't tested that).
Steps to Reproduce:
1. Type the string "ān̄ōū"
2. Change the font to Lato, or DejaVu Sans, or Arial (I only tested those)
3. Vary the font size between 10pt to 20pt (usually), by integer increment.
The macrons are not at the same heights, and that can vary with font size (⇒ The higher macron at 10pt can be the lowest at 14pt).
On the 'n' the macron can be, depending on the font, too much on the right.
Every macron should be at the same height, and horizontally centered on each char.
User Profile Reset: No
Screenshots : https://twitter.com/Cqoicebordel/status/1554938974694670338
Version: 18.104.22.168 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Ubuntu package version: 1:7.3.5~rc2-0ubuntu0.20.04.1~lo1
Created attachment 181583 [details]
Lato at 16pt
Created attachment 181584 [details]
Lato at 18pt
Please check if a font with known good metrics (i.e. something from Libertinus ) behaves on your os/GPU combo. Couold be a hinting issue, or more likely (especially with known good metrics) another dependency on bug 103322
And, do see a issue (of bad metrics & font hinting) in Dejavu Sans and Arial but especially obvious in Courier New. Those all are internal font issues--not anything that LO can correct.
Simply need to use a font with good metrics.
Created attachment 181613 [details]
macron U+0304 and circumflex U+0302 combining diacritics various fonts and sizes
simple test doc -- known good of Libertinus Serif versus some fonts with poor font mettics and handling of combining diacritics e.g. Dejavu Sans, Arial, Courier New, Times New roman.
Same issue with Libertinus 7.040 font, Sans and Serif (haven't tested the others flavors).
Created attachment 181618 [details]
combining diacritics mispositioned relative to base glyph -- even Libertinus fonts
Yes if I zoom the canvas in to %300 the heights for the combined U+0304 macron look to vary by quite a bit. Even with know good metrics of Libertinus Serif and Libertinus Sans.
Confirmed. Recent build of master against 7.5.0
Version: 22.214.171.124.alpha0+ (x64) / LibreOffice Community
Build ID: 5df1bb4b1b222be00d25097660c4ee33542896ea
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
guess this will end up dependent on a solution of bug 103322
Yes, I haven't said it before, but it depends on font size, but also on zoom.
Just playing with ctrl+wheel makes the macrons go up and down (relative to the others).
I can not reproduce this on macOS with LibreOffice 7.4.
Created attachment 182080 [details]
still some bad rendering - Courier New and Times New Roman
@Khaled, wait could you take a look at test doc attachment 181613 [details]
The Courier New and Tiems New Roman are both rendered poorly (on Windows builds at least) as in this screen clip of recent master. Is that going to be a font metrics issue now that Caoláns positioning tweak is in?
(In reply to V Stuart Foote from comment #11)
> Created attachment 182080 [details]
> still some bad rendering - Courier New and Times New Roman
> @Khaled, wait could you take a look at test doc attachment 181613 [details]
> The Courier New and Tiems New Roman are both rendered poorly (on Windows
> builds at least) as in this screen clip of recent master. Is that going to
> be a font metrics issue now that Caoláns positioning tweak is in?
These are font issues and I can reproduce elsewhere. Courier New fails to position the accents over “n” and Times New Roman positions them slightly higher over it than the other lowercase letters.
(In reply to خالد حسني from comment #12)
> These are font issues and I can reproduce elsewhere. Courier New fails to
> position the accents over “n” and Times New Roman positions them slightly
> higher over it than the other lowercase letters.
Fair enough. Though note even Libertinus has a slight misallignment, but I'd kind of agree we're doing OK on the VCL canvas.
The bug is still present here, on 7.4, with Libertinus Sans and Serif, with macrons.
(In reply to Cqoicebordel from comment #14)
> The bug is still present here, on 7.4, with Libertinus Sans and Serif, with
Macron over “n” is slightly higher in Libertinus Serif, and slightly lower and two the right in Libertinus Sans, and both are font issue.
So, is there a font that works out there ?
There are plenty of fonts that look good, the free ones I tested: DejaVu Sans, DejaVu Serif, Inter, Lato, Montserrat, Noto Sans, Noto Serif, Source Sans Pro, Source Serif Pro, Gentium Basic, Gentium Book Basic, Gentium Plus.
And *any* of the Libertinus family. They really are rather well done ;-)
And, I'd work with master against 7.5, not a 7.4 build (even its nightly), to see the state of things.
(In reply to V Stuart Foote from comment #18)
> And *any* of the Libertinus family. They really are rather well done ;-)
Bugs in FLOSS fonts should be reported to their respective repositories and it will hopefully get fixed.
Created attachment 182093 [details]
Noto Sans 12pt
Created attachment 182094 [details]
Noto Sans 13pt
I'm sorry to be a PITA, but from my side, it doesn't look like it's fixed, nor is a font issue.
If you look at the last two screenshot I uploaded, the position of the macron change on the 'n' depending on the font size. Which is the name of this bug :)
Font metrics are used to control the combining placement calculated for a particular font point size.
Distinct from effect of Zooming the canvas in and out as for comment 9 and having the combining glyphs dance.
The later behaves now, while the former is really dependent on what the font defines. Zooming attachment 181613 [details] with master build the diacritics remain as calculated. That's what we want, and then accept we can't control the variations faulty font metrics cause.
I trust you it works on master then. I only tested on 7.4, and I'll wait on 7.5 to see it and test it.
Thanks for the help.
Created attachment 182099 [details]
Noto Sans 16-24pt
I don’t see any of the displacement you are seeing, testing with 126.96.36.199. Either different font versions, or it is OS/DPI dependent. If someone else can reproduce, please re-open.