New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pango: temp fix for font size on Retina displays #27392
Conversation
John Ralls <jralls@ceridwen.us> writes: Cairo's CGFont backend already handles scaling fonts to the display resolution, so scaling to the screen screen resolution in Pango's CoreText backend generates double-sized text on a Retina display. The layout test depended on providing a (bogus) resolution of 96DPI and scaling the font to it in order to obtain the "expected" layout results. This is replaced by adjusting the font size in test-layout.c if Pango is compiled for CoreText. https://bugzilla.gnome.org/show_bug.cgi?id=782393
@hamishmack, thanks for your PR! By analyzing the history of the files in this pull request, we identified @vcunat, @urkud and @johbo to be potential reviewers. |
My nixpkgs might just have had an old version of something (perhaps pango), now I have rebased this change on the latest nixpkgs it does not seem to be needed. |
It seems that this patch does have some positive effect on current master. E.g., in |
@vbgl I think I messed up my testing. You are right, this patch does make things better for me too. It does make some fonts smaller than they should be (in Leksah at least). The ones it makes smaller though (at least in Leksah) have easy configuration options to make them bigger again. |
Can you download the patch using e.g., BTW, pango-1.40.7 is out, but it does not seem to address this issue. |
The bug is marked as NEW, so apparently upstream hasn't accepted that solution (yet). (I'd leave the decision to darwin-using members.) |
Upstream has applied the patch. Would you please use |
Sorry I did not get around to this. It might be better just to upgrade pango to 1.40.11 now. I have tried that out here and it seems to work. |
That pango update is now in staging: daa12ab. |
John Ralls jralls@ceridwen.us writes:
Cairo's CGFont backend already handles scaling fonts to the display
resolution, so scaling to the screen screen resolution in Pango's
CoreText backend generates double-sized text on a Retina display.
The layout test depended on providing a (bogus) resolution of 96DPI and
scaling the font to it in order to obtain the "expected" layout results.
This is replaced by adjusting the font size in test-layout.c if Pango is
compiled for CoreText.
https://bugzilla.gnome.org/show_bug.cgi?id=782393
Motivation for this change
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)