I'm returning (once again) to the splashscreen, and trying to get the text on it to look good. I've started by embedding the "official" font into the executable. Then, I've rendered the text three ways...
With antialiasing (top is Photoshop, bottom is Qt):
Without antialiasing, but still HiDPI:
Without antialiasing, lowDPI:
Basically, the Qt font rendering looks awful. Straight lines aren't straight, smooth curves aren't smooth, there's a weird blue cast to the edges, etc. I've played with toggling basically every setting I can thing of in QPainter and QFont, and I can't get anything approaching Photoshop levels of smoothness. On a High-DPI display it looks pretty terrible. Does anyone have any ideas about what might be causing these issues?
Debugging font antialiasing
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Debugging font antialiasing
Do you need to use a real-time font at all?
One approach would be to use the font at very large scale to get the desired smoothness and then shrink an image to the size needed for the splashscreen. Just paste the "FreeCAD" into the rest of the image instead of including a font overlay.
Gene
One approach would be to use the font at very large scale to get the desired smoothness and then shrink an image to the size needed for the splashscreen. Just paste the "FreeCAD" into the rest of the image instead of including a font overlay.
Gene
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Debugging font antialiasing
Agreed, if it's about allowing branding, well forks can just change the splashcreen image
Re: Debugging font antialiasing
I'm using the "FreeCAD" text as a test subject here, but we do also need the version string, and I think we shouldn't bake that into the graphic.
Re: Debugging font antialiasing
It seems that the problem is known, there are some mitigation here:
https://stackoverflow.com/questions/310 ... g-qpainter
But I don't know if this is similar to your problem, it seem related to dpi and QPainter it is 4 years old but...
Regards
Carlo D.
https://stackoverflow.com/questions/310 ... g-qpainter
But I don't know if this is similar to your problem, it seem related to dpi and QPainter it is 4 years old but...
Regards
Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
Re: Debugging font antialiasing
Do you have subpixel rendering + scaling active on your screen? The subpixel rendering won't survive scaling and makes things only worse.
Cheers,
Markus
Markus