FS#58235 - [libgdiplus] Cannot handle font fallbacks unless compiled with pango support

Attached to Project: Arch Linux
Opened by Mingye Wang (arthur2e5) - Sunday, 15 April 2018, 05:55 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:24 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
libgdiplus by default calls cairo directly. It retrives the first font match from fontconfig, and goes on to only use that match for all of the rendering. This of course breaks UI rendering in WinForms using e.g. "Sans", as a lack of fallbacks means a lot less font coverage and blank rectangles appear where they shouldn't happen.

The good news about this issue is that libgdiplus has a "--with-pango“ build option right in its official source. The option uses pango, which does fallbacks correctly. Yes, it's "UNSUPPORTED", but what on earth from Xamarin is meaningfully supported anymore?

This is a longstanding bug, reported as early as 2 years ago as https://bugzilla.xamarin.com/show_bug.cgi?id=39418.

Additional info:
* package version(s) (EVERY/ALL)

Steps to reproduce:
Compile the source at https://github.com/AOSC-Dev/aosc-os-abbs/issues/224#issuecomment-216431189, and run it in a locale where "fc-match Sans" does not give a Chinese font but is capable of displaying of Chinese text via fallback.
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:24 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/libgdiplus/issues/1
Comment by Mingye Wang (arthur2e5) - Sunday, 15 April 2018, 06:02 GMT
(And no, it is likely that this will never be fixed unless pango is used. Because Cairo alone is simply not for rendering multilingual text and doing stuff like fallbacks. cf. https://lists.freedesktop.org/archives/cairo/2015-May/026282.html)

Also, they appear to be working on supporting the pango stuff. That's a good thing -- maybe if you come back in a few months it will become the default.
Comment by Jan de Groot (JGC) - Wednesday, 18 April 2018, 10:26 GMT
Looking at post-release commits, it seems there has been some serious work on the pango support in libgdiplus.

We have some options here:
- implement this with next release, which can take quite some time
- backport the pango improvements
- push to snapshot
Comment by Marcell Meszaros (MarsSeed) - Monday, 25 April 2022, 12:14 GMT
Pango is now officially supported as a build option,
since v6.0, released on 2 Aug 2019.

Commit:
https://github.com/mono/libgdiplus/commit/d43e782fce7543fc352ae567cee1b81d3aa8e8d5

Latest release (v6.1 as of now):
https://github.com/mono/libgdiplus/tags
Comment by Marcell Meszaros (MarsSeed) - Sunday, 18 June 2023, 12:35 GMT
Any chance of libgdiplus getting updated and configured to use pango to fix this issue?

You know this package has the oldest flag-out-of-date in all of the Arch repis? (2019-08-08)
Comment by Marcell Meszaros (MarsSeed) - Sunday, 18 June 2023, 12:50 GMT
There are also a few as-yet unaccepted PR's improving font handling and rendering with Pango:

https://github.com/mono/libgdiplus/pulls?q=is%3Apr+is%3Aopen+pango
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.

Loading...