Bug 2001332 - pango-view with --backend=ft2 and ---antialias=none generates antialiased renderings
Summary: pango-view with --backend=ft2 and ---antialias=none generates antialiased ren...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: pango
Version: 34
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Peng Wu
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-05 15:24 UTC by a3emdot
Modified: 2022-05-13 02:44 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-05-13 02:44:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
image showing the problem (5.45 KB, image/png)
2021-09-05 15:24 UTC, a3emdot
no flags Details
image showing how it should look like (1.96 KB, image/png)
2021-09-05 15:29 UTC, a3emdot
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNOME Gitlab GNOME pango merge_requests 473 0 None None None 2021-09-09 06:14:56 UTC

Description a3emdot 2021-09-05 15:24:58 UTC
Created attachment 1820649 [details]
image showing the problem

Description of problem:

Hello Fedora Team,

I have a recently updated Fedora 34 installation.

The problem I want to report is that it looks like
the pango-view tool is always turning antialiasing on
when one uses the FreeType backend --backend=ft2,
even when one explicitly switches antialiasing off with --antialias=none,
whereas it works for the --backend=cairo option.

A second question would be if the FreeType backend
generally doesn't/can't support --antialias=none?
I tried to find some examples in C with antialising turned off
but I wasn't successful.

I must confess I didn't check other distributions.

As pango-view is regarded as a tool for creating minimal reproducers
against the font rendering stack, I dare to set the severity to 'high' :-)

Best Regards
Andre

Version-Release number of selected component (if applicable):

$ uname -a
Linux localhost.localdomain 5.13.13-200.fc34.x86_64 #1 SMP Thu Aug 26 17:06:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

$ dnf list installed | grep dejavu
dejavu-lgc-sans-fonts.noarch                2.37-16.fc34                        @fedora
dejavu-lgc-sans-mono-fonts.noarch           2.37-16.fc34                        @fedora
dejavu-lgc-serif-fonts.noarch               2.37-16.fc34                        @fedora
dejavu-sans-fonts.noarch                    2.37-16.fc34                        @fedora
dejavu-sans-mono-fonts.noarch               2.37-16.fc34                        @fedora
dejavu-serif-fonts.noarch                   2.37-16.fc34                        @fedora

$ dnf list installed | grep ImageMagick
ImageMagick.x86_64                          1:6.9.11.27-3.fc34                  @fedora
ImageMagick-libs.x86_64                     1:6.9.11.27-3.fc34                  @fedora

$ dnf list installed | grep pango
pango.i686                                  1.48.9-2.fc34                       @updates
pango.x86_64                                1.48.9-2.fc34                       @updates
pango-devel.x86_64                          1.48.9-2.fc34                       @updates
pangomm.x86_64                              2.46.1-1.fc34                       @updates

$ dnf list installed | grep freetype
freetype.i686                               2.10.4-3.fc34                       @fedora
freetype.x86_64                             2.10.4-3.fc34                       @fedora
freetype-devel.x86_64                       2.10.4-3.fc34                       @fedora

$ dnf list installed | grep fontconfig
fontconfig.i686                             2.13.94-2.fc34                      @updates
fontconfig.x86_64                           2.13.94-2.fc34                      @updates
fontconfig-devel.x86_64                     2.13.94-2.fc34                      @updates

$ dnf list installed | grep cairo
cairo.i686                                  1.17.4-3.fc34                       @fedora
cairo.x86_64                                1.17.4-3.fc34                       @fedora
cairo-devel.x86_64                          1.17.4-3.fc34                       @fedora
cairo-gobject.i686                          1.17.4-3.fc34                       @fedora
cairo-gobject.x86_64                        1.17.4-3.fc34                       @fedora
cairomm.x86_64                              1.14.2-8.fc34                       @fedora
python2-cairo.x86_64                        1.18.2-8.fc34                       @fedora
python3-cairo.x86_64                        1.20.0-2.fc34                       @fedora


How reproducible:

Always

Steps to Reproduce:

$ pango-view --no-display --dpi=72 --backend=cairo --antialias=none --font="DejaVu Sans 38" --text="ABCDEFGHIJKLMNOPQRSTUVWXYZ" --output=abc-cairo-aa-none.png
$ pango-view --no-display --dpi=72 --backend=cairo --antialias=gray --font="DejaVu Sans 38" --text="ABCDEFGHIJKLMNOPQRSTUVWXYZ" --output=abc-cairo-aa-gray.png
$ pango-view --no-display --dpi=72 --backend=cairo --antialias=subpixel --font="DejaVu Sans 38" --text="ABCDEFGHIJKLMNOPQRSTUVWXYZ" --output=abc-cairo-aa-subpixel.png
$ pango-view --no-display --dpi=72 --backend=ft2 --antialias=none --font="DejaVu Sans 38" --text="ABCDEFGHIJKLMNOPQRSTUVWXYZ" --output=abc-ft2-aa-none.png
$ pango-view --no-display --dpi=72 --backend=ft2 --antialias=gray --font="DejaVu Sans 38" --text="ABCDEFGHIJKLMNOPQRSTUVWXYZ" --output=abc-ft2-aa-gray.png
$ pango-view --no-display --dpi=72 --backend=ft2 --antialias=subpixel --font="DejaVu Sans 38" --text="ABCDEFGHIJKLMNOPQRSTUVWXYZ" --output=abc-ft2-aa-subpixel.png

$ gimp abc-*.png

Actual results:
Attached pngs.
The file abc-ft2-aa-none.png is in gray-scale and not as expected in black-white.
The file abc-cairo-aa-none.png is in black-white as expected.

Expected results:
I would have expected the files abc*--aa-none.png looking near identical.

Additional info:

Comment 1 a3emdot 2021-09-05 15:29:05 UTC
Created attachment 1820650 [details]
image showing how it should look like

Comment 2 a3emdot 2021-12-01 12:13:41 UTC
I wonder if this patch made it to the new pango 1.49 branch

Comment 3 Peng Wu 2021-12-02 05:41:45 UTC
I think the patch is in pango 1.49.2.

Maybe you can try it on Fedora 35 Workstation.

Comment 4 a3emdot 2021-12-02 09:21:52 UTC
Oh I missed that somehow. perhaps I selected the wrong branch somehow,
while exploring the file tree, sorry for that.

For the moment I can't test on Fedora 35, because I have still no Fedora 35 available :-(

Thank you Peng Wu and kind regards
Andre

Comment 5 Ben Cotton 2022-05-12 16:57:06 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 6 Peng Wu 2022-05-13 02:44:02 UTC
I tested in Fedora 36, I think this bug is fixed now.


Note You need to log in before you can comment on or make changes to this bug.