Skip to content
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

ClearType's sub-pixel rendering has changed from color to black and white, resulting in fuzzy font display #2226

Closed
meijialun opened this issue Feb 20, 2023 · 12 comments

Comments

@meijialun
Copy link

Version, Operative system
CherryTree 0.99.54, Win10 x64

Describe the bug
Windows ClearType's sub-pixel rendering has changed from color to black and white, resulting in fuzzy font display. And also some Chinese fonts cannot be fully displayed.

To Reproduce
Type some text in CherryTree 0.99.51, Windows ClearType's sub-pixel rendering looks ok.
Type some text in CherryTree 0.99.54, Windows ClearType's sub-pixel rendering has changed from color to black and white, resulting in fuzzy font display.

Screenshots
51
54

@meijialun
Copy link
Author

This problem may have existed in 0.99.52 & 53. So I haven't been able to use the new version, the font looks too bad.

@giuspen
Copy link
Owner

giuspen commented Feb 21, 2023

Can you try to edit C:\Program Files\CherryTree\etc\gtk-3.0\settings.ini (or etc\gtk-3.0\settings.ini if portable) and you should have

[Settings]
gtk-theme-name=win32

Can you try and add
gtk-xft-rgba=rgb
(from https://docs.gtk.org/gtk4/property.Settings.gtk-xft-rgba.html - you can try any of none, rgb, bgr, vrgb, vbgr)
I'm honestly ignorant in this matter but I suspect it may be just a default GTK3 setting that changed

@meijialun
Copy link
Author

meijialun commented Feb 23, 2023

Thanks, but it seems not working, it's still gray scale.
Maybe it needs to recompile the entire project?
Snipaste_2023-02-23_14-46-29

@meijialun
Copy link
Author

I used your README.md method to recompile Cherrytree in Windows with MSYS2, and did not add gtk-xft-rgba=rgb configuration, the run result is OK (rgb sub-pixel rendering)
But when I use my compiled cherrytree.exe to replace with cherrytree_0.99.54_win64_portable inside, it does not work (grayscale sub-pixel rendering)
This is too strange, there may be a problem with one of the lib components

@giuspen
Copy link
Owner

giuspen commented Feb 24, 2023

That's interesting.
Since you can successfully build yourself, maybe you can also try to create the portable folder yourself too, under the folder scripts it starts with msys2_...sh and generates a portable folder from your files to your Desktop.
The issue is not with the .exe but with one of the other files copied (or wrongly not copied) from the msys2 installation into the portable folder bundle (which is the same that the installer puts in Program Files)

@giuspen
Copy link
Owner

giuspen commented Feb 26, 2023

Can you test https://drive.google.com/file/d/1JtGXtxgykVMYZZftTLQOf5ov-k3k_FNj/view?usp=share_link and tell me if the bug is still there?

@meijialun
Copy link
Author

meijialun commented Feb 27, 2023

I'm sorry but Google service is not accessible in China. If you mean to run msys2_prepare_standalone.sh I have tried but failed like this.
Snipaste_2023-02-27_10-13-38
Snipaste_2023-02-27_10-04-41
Is there some encoding problem with this folder?
Snipaste_2023-02-27_10-07-31

@giuspen
Copy link
Owner

giuspen commented Feb 27, 2023

I will try to upload the package somewhere else and get back. I shall have a look also at the failing test.

@giuspen
Copy link
Owner

giuspen commented Feb 27, 2023

@meijialun
Copy link
Author

Yes, I can.
It's great, ClearType is rgb style in 0.99.54.99_win64_portable.7z now. Thanks.
#2171 is also fixed now.

@giuspen
Copy link
Owner

giuspen commented Feb 28, 2023

Excellent, thank you for testing, it was an issue with a library recently fixed in msys2

@giuspen
Copy link
Owner

giuspen commented Mar 7, 2023

fixed in upcoming 0.99.55

@giuspen giuspen closed this as completed Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants