[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg
Subject:    Help figuring out font rendering, please?
From:       joe M <joe9mail () gmail ! com>
Date:       2013-02-15 15:04:25
Message-ID: CAHjjW141frXv7bXYaYdmYVa3p_FHYmYTMwyoi3naymW6jfTLGw () mail ! gmail ! com
[Download RAW message or body]

Hello,

I am trying to figure out how font rendering works in X.

The app that I am debugging uses fontconfig calls to match the font
pattern string against the available fonts. Then, that font is
rendered using Xft (XftDrawStringUtf8).

With FC_DEBUG set, I can see that the correct font is being sent in
the call to XftDrawSTringUtf8. But, for some reason, the font
displayed by X is not the correct font. I understand that if a glyph
does not exist, xft falls back to a font which has a glyph.

While checking out XftDrawStringUtf8, I noticed this behaviour in a
lof of Xft code:

XftGlyphCore (XftDraw		*draw,
	      _Xconst XftColor	*color,
	      XftFont		*public,
	      int		x,
	      int		y,
	      _Xconst FT_UInt	*glyphs,
	      int		nglyphs)
{...
    XftFontInt	    *font = (XftFontInt *) public;

Where the XftFont is cast into XftFontInt. I noticed that the
structure definitions of XftFont and XftFontInt are very different.

That made me wonder if Xft is actually using the font supplied or if
it is just falling back to the font used by X or the fallback font all
the time.(?)

Any thoughts, please?

Thanks
Joe
_______________________________________________
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: freedesktop-xorg@progressive-comp.com
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic