Font hinting broken on 23.04

Bug #2017573 reported by mrvanes
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
fonts-ubuntu (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Just upgraded my laptops to Kubuntu 23.04 Lunar Lobster and hinting for all non-commercial fonts seems broken. I used to have decent if not perfect hinting on Ubuntu and Ubuntu Mono font, but now the only fonts that still hint correctly are Microsoft's Verdana and Tahoma etc. Not sure whether the devide is exactly along this line, but it stands out.

Tried regenerating font cache (fc-cache -rv) but that didn't help.

Operating System: Kubuntu 23.04
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.3.0 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-10510U CPU @ 1.80GHz
Memory: 31.1 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: Notebook
Product Name: N141CU
System Version: Not Applicable

Revision history for this message
mrvanes (mrvanes) wrote :
Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote (last edit ):

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug does not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at https://wiki.ubuntu.com/Bugs/FindRightPackage.

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://help.ubuntu.com/community/ReportingBugs.

Changed in ubuntu:
status: New → Incomplete
mrvanes (mrvanes)
affects: ubuntu → fontconfig (Ubuntu)
Changed in fontconfig (Ubuntu):
status: Incomplete → New
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks for your report!

I recall a couple of fonts related changes and issues. Since you mention the Ubuntu and Ubuntu Mono fonts, they were indeed upgraded.

But to start with it would be good if you could let us know the exact context where you see that hinting has changed. Is it in connection with rendering web pages, or is it about the font used in menus etc. on the desktop?

Please clarify.

Changed in fontconfig (Ubuntu):
status: New → Incomplete
Revision history for this message
mrvanes (mrvanes) wrote :

This is about the context in de Plasma desktop. My fonts were set to Ubuntu and Ubuntu Mono and I use full hinting where anti-aliasing is disabled to get crisp and clear fonts. This is now broken in 23.04 and can be worked around using Verdana.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Ok, thanks. You said "I use full hinting". Are you referring to some custom font configuration?

I'm asking because I'm not aware of any general Ubuntu changes with respect to hinting. And the file names of the Ubuntu and Ubuntu Mono font files were changed.

Revision history for this message
mrvanes (mrvanes) wrote :

So, the idea is that I set anti-Aliasing to exclude 8pt to 15pt and set hinting to full. This makes the desktop fonts render crisp and sharp, which used to work for all fonts having decent hints, among which were e.g. Ubuntu and Ubuntu Mono (but a lot more fonts have this). Now, none of the fonts render correctly hinted EXCEPT the Microsoft fonts, of which Verdana and Tahoma are the most famous examples.

So the problem is not restricted to Ubuntu and Ubuntu Mono, those are just a examples of the fonts that I used before and that don't correctly hint anymore, but there's many more (all except MS?) that now lack proper hinting.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

I had a look in a Kubuntu 23.04 install I have in a VM, and it looks like changes via the KDE UI for managing fonts alters the file ~/.fonts.conf. If that is the way you do it, can you please attach your ~/.fonts.conf file to this bug report.

The ~/.fonts-conf file has been considered deprecated for quite a while. I wonder if they possibly have stopped to read that file now, which would explain your observation.

Otherwise, if ~/.fonts.conf still is a valid place for fontconfig rules, it might be a Plasma issue...

Revision history for this message
mrvanes (mrvanes) wrote :

It's written to ~/.config/fontconfig/fonts.conf and it certainly is used. I test by re-launching systemsettings. If I remove the file, fonts are rendered using the system default (anti-aliased). Saving my settings creates this file and uses the contents (anti-alias exclude range + full hinting) on the next launch.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2023-04-24 23:00, mrvanes wrote:
> It's written to ~/.config/fontconfig/fonts.conf

For me it's not. Wonder why.

> and it certainly is used.

Right, it should be, because that file path is not deprecated.

Thanks for clarifications.

Then, if I understand it correctly, the problem is specific to Plasma somehow, i.e. the Plasma desktop does no longer honor the font configuration. Is that a correct interpretation of the issue?

Revision history for this message
mrvanes (mrvanes) wrote (last edit ):

No I think it's somehow deeper. Plasma honours the configuration, but the hinting for certain fonts is broken. Correctly hinted fonts should nicely follow pixels on a resolution restricted display. That is no longer the case and results in ugly rendered fonts. See attachment from the first post for an example.

I am not sure what part is responsible for rendering the fonts under Wayland, hence the absence of package name on the original post.

Revision history for this message
mrvanes (mrvanes) wrote :

See attachment for clarification of bad/broken hinting.
In this example I'm using Verdana (correctly full hinted) to display the dialog and choose Ubuntu Mono to be previewed (incorrectly full hinted)

Revision history for this message
mrvanes (mrvanes) wrote :

This is what Verdana without hinting looks like, so it's clear that hinting setting has influence on rendering of Verdana font, but doesn't on other fonts.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks again.

You mentioned "under Wayland". Does that mean that the issue is not present if you log in to a Plasma (X11) session instead of a Plasma (Wayland) one?

Revision history for this message
mrvanes (mrvanes) wrote :

I was trying to be as complete as possible in my bugreport but I just checked and there is no difference under X11 (same issue).

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

I made some changes to this bug report, such as replacing fontconfig with plasma-desktop as the affected package. While I'm not sure about that either, it's a way to call the Kubuntu developers' attention to the issue.

affects: fontconfig (Ubuntu) → plasma-desktop (Ubuntu)
Changed in plasma-desktop (Ubuntu):
status: Incomplete → New
summary: - Font hinting broken on 23.04
+ Font hinting broken on Plasma 23.04
tags: added: lunar regression-release
Revision history for this message
mrvanes (mrvanes) wrote : Re: Font hinting broken on Plasma 23.04

Just for reference I add a picture showing hinted Ubuntu Mono on 22.04. It clearly shows that it has high quality hinting capabilites. This is a regression and I doubt it's in plasma-desktop since that is not responsible for font rendering. Could you please make a screenshot of 9pt Ubuntu Mono with the same settings on 23.04 and post a 300% blow-up of that picture?

Revision history for this message
mrvanes (mrvanes) wrote :

Just to make sure we do NOT blame the new Ubuntu Font changes in 23.04, this is an example of non-Ubuntu font hinting regression between 22.04 and 23.04.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in plasma-desktop (Ubuntu):
status: New → Confirmed
Revision history for this message
Dmitriy Geels (dmig) wrote :

I'm observing this bug in Gnome desktop.

Figured out, it's related to settings:
- changing font rendering options in 'Tweaks' have no effect
- rendering looks like default (grayscale antialiasing, no hinting)

Was able to workaround using manual configuration method from Arch wiki: https://wiki.archlinux.org/title/font_configuration#Presets
Font rendering still looks worse than in 22.10, but very close.

The workaround:
1. mkdir -p .config/fontconfig/conf.d
2. ls /usr/share/fontconfig/conf.avail/ # <-- choose suitable options from here
3. ln -s /usr/share/fontconfig/conf.avail/you-option ~/.config/fontconfig/conf.d/ # < repeat for every chosen option
4. logout & login again

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

@Dmitriy: Thanks for your input. However, I think that your observation reasonably is something else.

Changing font rendering options in Tweaks results in changed dconf values, for instance:

$ gsettings get org.gnome.desktop.interface font-hinting
'full'

That's only seen in applications (the core GNOME desktop ones) which query those dconf values. It does not try to change the fontconfig behavior system wide.

Kubuntu, OTOH, does change the fontconfig behavior, since it actually does the equivalent of what you achieve through your workaround.

So what you call a workaround is a sensible way to change the font configuration system wide. Tweaks is not designed to do that AFAIK.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-desktop (Ubuntu):
status: New → Confirmed
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

@mrvanes: Picking the appropriate affected package is sometimes a trial and error exercise. This bug is an example of that.

Possibly plasma-desktop isn't the right package. But OTOH that's where we see the issue, i.e. the refusal to honor the font hinting value. And by picking plasma-desktop, the Kubuntu developers will see this bug. In the end we may conclude that it should be reported upstream. But which upstream? Well, my belief is that the Kubuntu devs have the best insight in that respect.

I have played a little more with my Kubuntu 23.04 installation. While it apparently recognizes fontconfig's setting with respect to hinting, I can confirm that the setting is not honored when rendering. Since it's a VM, sending screenshots is a bit tricky, so I won't do that. I think you already have provided sufficient evidence which supports the existence of an issue.

@Dmitriy: Since you haven't opposed my reply to you, I dropped gnome-desktop as an affected package. If you experience font rendering issues in Ubuntu/GNOME, please file a separate bug about that.

no longer affects: gnome-desktop (Ubuntu)
Changed in plasma-desktop (Ubuntu):
importance: Undecided → Medium
Revision history for this message
mrvanes (mrvanes) wrote :

@gunnerhj I'm going to be very picky here.
Plasma does respect the hinting setting, which can be seen when I disable hinting and the Verdana screenshots look awful. When hinting is enabled, Verdana looks good, however all the other fonts are not hinted. So in my analysis, the hinting is correctly set and honoured by all the parts involved, but incorrectly executed at the font rendering level, depending on the font, not the setting.
Which makes me suspect this issue should be visible in Gnome as well. If it isn'n I'm stupified?!

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks for being picky.

I did a more thorough test on Ubuntu (with GNOME). I focused on the Ubuntu font, disabled antialiasing, tested with hining "none" respective "full", and studied the rendering of a particular string in GNOME's Settings menu.

Conclusion: fonts-ubuntu 0.863 — unlike fonts-ubuntu 0.83 — ignores the font hinting value. That's true both in the 23.04 and the 22.04 environment (with different versions of fontconfig). So, as regards the Ubuntu font, the problem seems to be with the font itself.

And yes, the problem is apparently not Kubuntu specific.

Now, the Ubuntu font underwent a big redesign in the 23.04 development cycle. If you look at the attached picture, you see that the new fonts-ubuntu (which ignores the fonts hinting) looks rather similar to the old fonts-ubuntu with full hinting. I can't help wondering if hinting possibly is built-in in the new fonts-ubuntu, and that it has intentionally been detached from the configured hinting value. If not, we have identified a fonts-ubuntu bug. And that would be a regression.

As regards other fonts but Ubuntu, where you have found that font hinting is ignored when rendering: Have you confirmed that font hinting was respected in e.g. Kubuntu 22.04 for those fonts? (Asking because I have not yet looked closer at any other fonts myself.)

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

And this is the picture I talked about.

Revision history for this message
mrvanes (mrvanes) wrote :

I know Ubuntu font underwent changes in 23.04 but comment #17 was explicitly added to discharge any suspicion towards that change. It's NOT only Ubuntu font that hints incorrectly when hinting is enabled. All fonts that looked great in 22.04 are now horribly rendered in 23.04, like e.g. Liberation Sans in #17.

It was a bad coincedence that I started this bugreport mentioning Ubuntu font, since that was my default before migrating to 23.04.

I did a little search and my best guess now would be that this is a regression in libfreetype.
There is an explicit fix for hinting mentioned in the changelog for 2.12.1 which may have side effects not encountered before or that are now exposed by another change in 23.04? https://sourceforge.net/projects/freetype/files/freetype2/2.12.1/

Hmm... it seems kinetic was shipped with 2.12.1 as well, so that makes it little less likely. Although the dfsg went from 3 to 4 in lunar?

Revision history for this message
mrvanes (mrvanes) wrote :

Neither downgrading freetype to 2.12.1 dfsg-3 nor upgrading to self compiled 2.13 resolves the problem. Back to the drawing board.

Revision history for this message
mrvanes (mrvanes) wrote :

Downgrading (lib)fontconfig* to 2.13 doesn't help as well. I'm running out of ideas.

Revision history for this message
Dmitriy Geels (dmig) wrote :

@mrvanes, could you check fontconfig-config?

Maybe this issue is configuration-related?

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

@mrvanes: You missed one aspect of my observations for the Ubuntu font.

* On Ubuntu 22.04 font hinting works to start with. If I upgrade to the fonts-ubuntu 0.863-0ubuntu3 package there, the rendering happens irrespective of the font hinting value.

* On Ubuntu 23.04 font hinting is broken to start with. If I downgrade to the fonts-ubuntu 0.83-6ubuntu1 package there, the rendering honors the font hinting value.

So the regression, at least for this particular font, seems to be unrelated to other packages.

@Dmitriy: The above indicates that the upgrade of fontconfig is not part of the picture.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

@mrvanes: I tested with Liberation Sans and Verdana on Ubuntu with GNOME. My notes:

* I can confirm that Verdana honors the font hinting, both on 23.04 and 22.04.

* I can confirm that Liberation Sans ignores the font hinting on 23.04. However, I see the very same behavior on 22.04. The difference in rendering between no hinting and full hinting is very small. Please see the attached picture.

So the only regression I see is the changed behavior related to the upgrade of the Ubuntu font.

It appears to me — as you already have indicated — as if only some fonts honor the font hinting value. But my observations indicate that that is by design. Maybe the default font configuration — antialiasing enabled and only slight hinting — is there for a reason.

I'm no longer sure that we have a bug here. :/

no longer affects: plasma-desktop (Ubuntu)
summary: - Font hinting broken on Plasma 23.04
+ Font hinting broken on 23.04
Revision history for this message
mrvanes (mrvanes) wrote :

I admit I'm also quite at a loss, though the overall feeling is a loss of functionality (hence the report). For me, hinted Liberation Sans renders perfect on 22.04 (and 22.10 for what it's worth) but looks horrible on 23.04, see comment #17. There is no font version difference on both releases.

And indeed, comment #28 rules out any involvement of fontconfig package family.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote (last edit ):

Yes, Liberation Sans was last built on Ubuntu 3+ years ago before the 20.04 release, so we know that it's the very same font in the various releases.

May I ask: Did you draw conclusions from the preview field in the fonts selection window only, or did you continue and saw the different alternatives in a real-world context, so to speak?

When I tested on Ubuntu I actually made the fonts changes in Tweaks. Then I opened GNOME's Settings menu (Settings is one of the tools which query the related dconf values), took a screenshot of a specific string there, and used Gimp to scale it up to 600%.

Revision history for this message
mrvanes (mrvanes) wrote :

The very first conclusion was from applied Ubuntu/Ubuntu Mono on restart of 23.04, the rest was mostly based on previews in the systemsettings fonts dialog scaled up to 300%, except comment #12, which was Verdana no-hinting applied.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote (last edit ):

Ok. The thought I had was that the Kubuntu fonts dialog may not reflect the actual rendering 100% correctly. I'm not claiming that's the case, but I feel there is such a risk.

Anyway, I'm going to seek help to find out whether the changed behavior of the Ubuntu font is by design, or if it is a bug. As regards other fonts which more or less seem to ignore the fonts hinting value, I don't know right now. As regards Liberation Sans I couldn't confirm a regression.

Myself normally uses the defaults with respect to hinting and antialiasing, and that works ok for me. When accomplishing some tests with antialiasing disabled, I couldn't help wondering what the point is with doing so.

Revision history for this message
mrvanes (mrvanes) wrote :

Ok, I'll do some more testing and investigation myself as well.

Regarding the hinting, that clearly is a matter of taste. I think non-aliased hinted fonts (8pt or 9pt) on a full HD screen look much better (crisp and sharp) than aliased fonts at that size. Mind that I do alias fonts bigger than 15pt. The aliasing exclusion range setting is there for exactly this reason.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

@Sebastien: One open issue from the discussion above is that the new Ubuntu font (fonts-ubuntu 0.863-0ubuntu3) does not honor the fonts hinting value set in Tweaks or directly via an equivalent fontconfig .conf file. fonts-ubuntu 0.83-6ubuntu1 does respect fonts hinting.

Do you know whether the new behavior is by design or should be considered a bug?

Revision history for this message
mgiammarco (mgiammarco) wrote :

I have the same problem of wrong hinting in 23.04 using kde.
I have checked with kde magnifier and I see that, in addition to wrong hinting, font in title bar and in other places has no rgb hinting but monochrome one.
Can you please check and confirm this behaviour too?
Thanks,
Mario

Revision history for this message
mrvanes (mrvanes) wrote (last edit ):

@mgiammarco This is what anti-aliased rendering with RGB subpixel rendering blown up to 600% looks for me. Does this help?

Revision history for this message
mgiammarco (mgiammarco) wrote :

I am sorry for you but it is grayscale not rgb. It confirms my bug. I attach mine with rgb hint: look at color fringes around chars.
Anyway it is good you confirm my theory that it does not comply also to rgb hint.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in fonts-ubuntu (Ubuntu):
status: New → Confirmed
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

@mgiammarco: I'm not a font expert, so this discussion is a bit over my head, I think. Nevertheless I miss some basic information which I believe is necessary to understand the nature of your observation:

* Which are your effective fontconfig settings?
* Which font(s) are not rendered as you would expect?

As regards the default RGB settings, they were changed in 23.04 in all other flavors but Kubuntu. Kubuntu already had the symlink

/etc/fonts/conf.d/10-sub-pixel-rgb.conf

by default, while other flavors had no sub-pixel rule. In 23.04 10-sub-pixel-rgb.conf is default in all flavors.

Revision history for this message
mrvanes (mrvanes) wrote :

@gunnarhj What @mgiammarco is trying to explain is that the RGB subpixel rendering is also broken. RGB subpixel rendering is a way to make aliased fonts look even smoother by making use of the physical layout of the panel pixels. By colouring the aliased pixel, they can be positioned closer to the stem of the character (at the pixel level) instead of being an average grey level. So, the blow-ups of RGB subpixel rendered fonts show a regression in the RGB subpixel rendering.

There is only an extra setting to choose the order of the RGB subpixels, but a blow-up of RGB subpixel rendered fonts should always result in coloured aliasing pixels. They are clearly misssing in @mgiammarco and my screenshots (which was taking from Open Sans as a random example).

@mgiammarco I know my screenshot was not correct, I was giving you the requested screenshot to confirm the additional regression.

I still feel this is a regression in libfreetype or something near libfreetype? Although RGB subpixel rendering problem could be caused by not honouring the setting, since normal aliasing would look grey-scale like in the screenshots. That would point to fontconfig or fontconfig-config.

Revision history for this message
mgiammarco (mgiammarco) wrote :

Good explanation @mrvanes thanks.
Infact actually it seems broken:
- font hinting (spacing, kerning)
- rgb subpixel rendering (random: some application have good rgb rendering some not)
- font size (kde title bar is bigger than in 22.10, because font is bigger too)

All these problems seems related to libfreetype,

Revision history for this message
mrvanes (mrvanes) wrote :

@mgiammarco I agree it all points to libfreetype, but I compiled libfreetype 2.13.0 from source and see exactly the same problems (or I made a mistake replacing the system libs while installing libfreetype?). Also, downgrading to 22.10 libfreetype package didn't resolve the problems.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

The latest significant change to libfreetype6 happened in 22.10, so I think you need to downgrade to the version shipped by 22.04 to possibly notice a difference.

Revision history for this message
mrvanes (mrvanes) wrote :

But the regression took place after upgrading from 22.10. So it keeps getting weirder and weirder.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Could have to do with the new variable fonts, you could try to install the ubuntu-fonts deb from Kinetic and see if it has the same issue

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2023-05-02 15:33, Sebastien Bacher wrote:
> Could have to do with the new variable fonts, you could try to
> install the ubuntu-fonts deb from Kinetic and see if it has the same
> issue

Already did that. The wording of comment #37 was based on such a test, and the issue is not present if you downgrade to the old fonts-ubuntu package.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

@Sebastien: But yes, it might be related to the new variable font. This shows the result of my test:

https://launchpadlibrarian.net/663331455/hinting-test_fonts-ubuntu.png

So the new fonts-ubuntu (where hinting does not make a difference) looks rather similar to the old fonts-ubuntu with full hinting.

So what I'm wondering is if the new fonts-ubuntu disregards the font hinting value intentionally or if it is a bug.

Revision history for this message
Sebastien Bacher (seb128) wrote :

I'm not a font expert but quoting https://github.com/canonical/Ubuntu-fonts/issues/82

> The variable font is unhinted (a standard practice), so you may see slightly different results between the new static and variable font.

so maybe that explain the difference/not respect of hinting settings with the new Ubuntu font? Though the report comments states other fonts also have the problem so it's probably not the explanation...

Revision history for this message
mgiammarco (mgiammarco) wrote :

Regarding rgb I have checked better and, in my screen, it is quite crazy:
- kde apps, firefox, chrome, they honour rgb hinting;
- kwin window titles, firefox menus, they do NOT honour rgb and render monochrome.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2023-05-02 17:43, Sebastien Bacher wrote:
> I'm not a font expert

Me neither.

> but quoting https://github.com/canonical/Ubuntu-fonts/issues/82
>
>> The variable font is unhinted (a standard practice), so you may
>> see slightly different results between the new static and variable
>> font.
>
> so maybe that explain the difference/not respect of hinting settings
> with the new Ubuntu font?

That sounds plausible. Thanks!

> Though the report comments states other fonts also have the problem
> so it's probably not the explanation...

Well, the discussion at this bug report has indeed mentioned quite a few other font rendering aspects. We would need a font expert to sort it.

But as regards the fonts-ubuntu bug task we *might* now have the answer, i.e. not a bug.

@mrvanes: What do you think? Do we have a reasonable explanation with respect to fonts-ubuntu and hinting? If not, you may want to chime in at the upstream issue which Sebastien pointed at.

Revision history for this message
mrvanes (mrvanes) wrote :

The fact that I mentioned Ubuntu (Mono) in the original report is a coincidence. As far as I can tell, there is no relation to the updated Ubuntu font, except that it may exacerbate the regression.
There are many fonts (I think all, except the mentioned Microsoft fonts like e.g. but not limited to Verdana and Tahoma) that have proper hinting information but that now render unhinted. E.g. the mentioned Liberation Sans has good hinting instruction that is currently not used (in my setup).

Revision history for this message
Sebastien Bacher (seb128) wrote :

is the issue desktop environment specific? could you try if a GNOME session shows the same problems?

Revision history for this message
mrvanes (mrvanes) wrote :

That was already covered in this issue, but I just unstalled Ubuntu 23.04 in a VM to be sure and here's the screenshot of a failing hinted Liberation Sans in GNOME.

Revision history for this message
mrvanes (mrvanes) wrote :

And this is the perfectly hinted Verdana9 counter example on Ubuntu 23.04 using GNOME desktop.

Revision history for this message
mrvanes (mrvanes) wrote :

Ok, I solved the problem. There were many coincidences playing a role in this report.

For starters the (real) regression in fonts-ubuntu triggered my attention, but unlucky testing against Liberation Sans revealed a change in hinting between fonts-liberation and fonts-liberation2, which wasn't installed on my reference system. fonts-liberation2 lacks proper hinting (which showed on my 23.04 system) but fonts-liberation is properly hinted (on the 22.04 machine). Once installed, fonts-liberation2 overrides all Liberation fonts, except for Liberation Sans Narrow.

Removing fonts-liberation2 and downgrading fonts-ubuntu to fonts-ubuntu_0.83-6ubuntu1_all.deb seems to solve all the reported problems.

My apologies for the noise.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks for your follow-up, mrvanes. I didn't even know that there are two fonts-liberation variants.

Hmm.. I see that both fonts-liberation and fonts-liberation2 are installed by default on standard Ubuntu (both 22.04 and 23.04), which explains why I wasn't able to confirm any regression with respect to Liberation Sans when testing on Ubuntu. Can't help wondering if it makes sense to install both.

Maybe we should replace fonts-liberation with fonts-liberation2 here:

https://git.launchpad.net/~ubuntu-core-dev/ubuntu-seeds/+git/platform/tree/desktop-common#n95

Any thoughts on that @mrvanes and @Sebastien?

Revision history for this message
mrvanes (mrvanes) wrote :

The README for fonts-liberation2 says:

  * This is fonts-liberation v2 packaged in a separate source package.
    The binary package is co-installable with fonts-liberation v1
    by installing the actual TTF files into a different directory
    (i.e. /usr/share/fonts/truetype/liberation2).
    Since the v1 and v2 fonts share the same family names, fontconfig
    with its default configuration will always prefer the v2 variants
    because of their higher version numbers and wider glyph coverage.
    This way, it is possible to override fonts-liberation v1 for most
    applications using fontforge (and not explicitly accessing the fonts
    by full path) while still keeping the v1 Sans Narrow variant available.

So there is a reason to install both, except that it's a shame that liberation2 introduces a regression in the hinting capabilities. I don't think many people use non-AA'd hinted fonts like me and let's not forget it was just an unlucky counter example from my side. So I'd stick with both packages in the seed and have Liberation Sans Narrow as a perk.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Ok, that was just a thought and strictly unrelated to the contents of this bug discussion.

Thanks for your patience with multiple clarifications and own efforts to nail down the problem. Closing the bug then.

Changed in fonts-ubuntu (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
mgiammarco (mgiammarco) wrote :

Sorry but it is not closed for me, I have all font without correct hint, and most without rgb hints.

Revision history for this message
Dmitriy Geels (dmig) wrote :
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2023-05-05 15:11, mgiammarco wrote:
> Sorry but it is not closed for me, I have all font without correct
> hint, and most without rgb hints.

That statement is too sweeping to be useful in a bug report.

The observations which mrvanes brought up have been sorted, and the additional aspects added by you do not stand on their own. I think you need to explain more precisely the nature of the issues you see.

I would suggest that you pick one application, submit a bug against that application (probably upstream), and show in considerable detail how the current rendering of a specific font in that application differs from what you would expect. Doing so might help to narrow down the problem.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.