[cairo] scaled fonts in X11

James K. Lowden jklowden at schemamania.org
Tue May 12 14:39:03 UTC 2020

On Mon, 11 May 2020 18:27:25 +0200
Johann Lermer <johann.lermer at elvin.eu> wrote:

> On Mon, 11 May 2020 10:07:55 -0400
> "James K. Lowden" <jklowden at schemamania.org> wrote:
> > Given the choice between setting a font size to, say, 12 points, and
> > scaling the cairo_t and font to a readable size, or just asking for
> > 16 points, is there any theoretical advantage either way? 
> a 12 point font which ist scaled by 1,33 is different from a 16 point
> font. The reason is,that smaller fonts have usually different
> dimensions to make them easier to read. 

Danke, mein Herr.  

So, in this case at least, the user is better off without scaling,
where my application simply requests the larger font.  That makes
intuitive sense: best results are obtained when the requested font
is rendered exactly as the font engine computed.  

> And honestly, Cairo does not very well in scaling fonts. There seems
> to be a bug with scaled fonts, CTM and the cairo context, whenyou use
> X11 as target surface

It would be nice if that were documented somewhere.  The X11 tutorial
at https://www.cairographics.org/Xlib/ reads more like an advertisement
than a realistic description of the status. 


More information about the cairo mailing list