[Development] Why on Linux using FreeType engine fonts are rendered in 72 dpi instead of Screen DPI?

Jason H jhihn at gmx.com
Wed Oct 17 21:17:27 CEST 2018


+1. Make sure that you are accounting for the full font height, see QFontMetrics::ascent() and descent()


> Sent: Wednesday, October 17, 2018 at 1:23 PM
> From: "Allan Sandfeld Jensen" <kde at carewolf.com>
> To: development at qt-project.org
> Subject: Re: [Development] Why on Linux using FreeType engine fonts are rendered in 72 dpi instead of Screen DPI?
>
> On Mittwoch, 17. Oktober 2018 19:10:45 CEST Tomasz Olszak wrote:
> > Could you please try example I sent on Linux and explain why font size
> > doesn't match rectangle size? Maybe the ft font engine has bug?
> > 
> Try putting a capital Å or any other capital with accents in your example, and 
> you will see that it fits snugly.
> 
> Though it should be noted fonts are a bit inconsistent in what they consider 
> their heights, some use the capital-height as their height, some use the 
> maximum including accents. I believe we normally always render text with the 
> leading on top, so there is room for all the Latin-1 characters and the 
> results are always the same.
> 
> 'Allan
> 
> 
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>



More information about the Development mailing list