Created attachment 187152 [details] Example of rendering "staff fee foo" in 11pt zoom 100% With GTK3 on Linux, ligatures in text that's rendered using the Calibri font family, in size 11pt zoom 100%, get rendered inconsistently with the rest of the text. Example screenshot (again, 100% zoom) is attached. Note the ff has colorized subpixel rendering and the rest of the text has nothing, no anti-aliasing/subpixel etc. I also see this with the ligatures for ti and fi. Seen with: Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 5cd9de202765e243e41416802f3e4486b8a96f16 CPU threads: 4; OS: Linux 6.1; UI render: default; VCL: gtk3 Locale: he-IL (en_IL); UI: en-US and also the 7.4.5.1 release.
With qt5 for the VCL, this doesn't happen; all text is rendered with anti-aliasing.
Calibri is a MS font, not supported on Linux without commercial license from Ascender / Monotype. Is it even on your system, and are you getting fallback glyph for the ligatures? So how does it look with Carlito? From the Croscore/Crosextra bundling. Check U+0133 U+0153 U+fb00 U+fb01 U+fb02 U+fb03 U+fb04 and maybe also U+fb05 and U+fb06 which have no coverage in Calibri/Carlito, so you'll see a fallback glyph for sure on those.
(In reply to V Stuart Foote from comment #2) > Calibri is a MS font Yeah - and the default MSO font for many years. We should render it properly. >, not supported on Linux "Supported"? It's a TrueType font, and TrueType fonts are supported on Linux. > without commercial license from Ascender / Monotype. That's not relevant to rendering the font. > Is it even on your system, and are you getting fallback glyph for the ligatures? It's on my system. (Also, couldn't it have just been embedded in the document? I know MS Word offers this feature.)
(In reply to Eyal Rozenberg from comment #3) > (In reply to V Stuart Foote from comment #2) > > Calibri is a MS font > > Yeah - and the default MSO font for many years. We should render it properly. > > >, not supported on Linux > > "Supported"? It's a TrueType font, and TrueType fonts are supported on Linux. > > > without commercial license from Ascender / Monotype. > > That's not relevant to rendering the font. > > > Is it even on your system, and are you getting fallback glyph for the ligatures? > > It's on my system. (Also, couldn't it have just been embedded in the > document? I know MS Word offers this feature.) If Calibri is "on" your Linux system it is NOT the Microsoft built font--the only legitimate source for use on Linux is commercial license Ascender / Monotype delivered font packaging. Otherwise, Linux is limited to use of metric "equivalent" Carlito. So, unless fontconfig fc-list dumps back a Calibri ident, you are using something else--made worse when fontconfig has to fill in holes for missing Unicode glyphs. I think I'd seen where Khaled had noted we shape with hb first and then fill in with missing glyphs--so the western text ligatures could take either route. Missing glyphs with fall back assignment that may not match the hb shaping, or glyps present in the font but with borked metrics. I'd prefer to get his opinion here. As to "supported" yes if you have a valid OTF/TTF source for Calibri installed to your Linux system fontconfig will use it. But that is not the norm, and the Croscore/Crosextra delivered Carlito is to likely fallback. But it is a fallback with all the issues that come with it.
IIRC, This is a hinting issue in the font, the ligatures are not hibted the same way as the non-ligated glyphs. Don’t use font hinting and use auto hinting instead (I believe light hinting mode does this). Also mske sure you are using the latest version of the font, it might have this sorted out.
The exact font file used and the hinting settings on the system are needed, and how the text is rendered in other GTK apps.
I checked the font, and I now remember correctly. The font has embedded bitmaps for certain pixel sizes but they cover only a small subset of the glyphs. FreeType will use the bitmaps when they are available for the current font size. You can setup FontConfig to not use embedded bitmaps. This is a font and local configuration issue, nothing for LibreOffice to do here.
(In reply to خالد حسني from comment #7) If this were some arbitrary font, then I agree. But we are talking about the default font in MSO - to this day (even though I understand they're replacing it). And - what I believe to be the default fontconfig settings. So I'm not so sure it's legit - in terms of user experience and expectations - to just say that it's not our problem.
Created attachment 187174 [details] The Calibri regular font file in question As per Khaled's request, a copy of the font file. Other GTK apps also seem to exhibit the same behavior (although in some you can control it, like with gimp).
No idea what we should do here then, we are respecting the font and the settings.
(In reply to خالد حسني from comment #10) > No idea what we should do here then, we are respecting the font and the > settings. Well, if we don't do something automatically, we should at least let the user disable ligatures on a per-document-and-font-family/font-family-variant basis.
You can control any font feature including ligatures from the font features dialog.
Ok, verifying.