Discussion:
Xft - problem with XftFontOpenName and XftFontOpen functions.
John Found
2012-02-13 19:09:19 UTC
Permalink
I am trying to use Xft but stuck with following problem - when I open font with
XftFontOpenName and XftFontOpen functions, I can't switch antialias and hinting properties.
For example, opening font with name:
"FreeMono:pixelsize=16:weight=bold:antialias=false:rgba=0:slant=italic", creates a font with
proper typeface, size, weight and slant, but antialiased.
The other group of properties that are not settable are the hinting properties.

The same result was reached with XftFontOpen function.
I am importing the functions from the library "libXft.so.2.1.13"

Can someone help me on this problem? Any suggestions are welcome.

Regards.

http://fresh.flatassembler.net
Assembly language visual programming.
John Found
2012-02-13 19:14:44 UTC
Permalink
I am trying to use Xft but stuck with following problem - when I open font with
XftFontOpenName and XftFontOpen functions, I can't switch antialias and hinting properties.
For example, opening font with name:
"FreeMono:pixelsize=16:weight=bold:antialias=false:rgba=0:slant=italic", creates a font with
proper typeface, size, weight and slant, but antialiased.
The other group of properties that are not settable are the hinting properties.

The same result was reached with XftFontOpen function.
I am importing the functions from the library "libXft.so.2.1.13"

Can someone help me on this problem? Any suggestions are welcome.

Regards.

http://fresh.flatassembler.net
Assembly language visual programming.
John Found
2012-02-19 08:13:08 UTC
Permalink
Hm, nobody knows or nobody cares?
Or it is a great secret, for the internal circle only? :D

---------- Original Message ----------
To: (***@lists.x.org)
From: John Found (***@evrocom.net)
Subject: Xft - problem with XftFontOpenName and XftFontOpen functions.
Date: 13.02.2012 21:14:44
Post by John Found
I am trying to use Xft but stuck with following problem - when I open font
with XftFontOpenName and XftFontOpen functions, I can't switch antialias and
hinting properties.
"FreeMono:pixelsize=16:weight=bold:antialias=false:rgba=0:slant=italic", creates a font with
proper typeface, size, weight and slant, but antialiased.
The other group of properties that are not settable are the hinting properties.
The same result was reached with XftFontOpen function.
I am importing the functions from the library "libXft.so.2.1.13"
Can someone help me on this problem? Any suggestions are welcome.
Regards.
http://fresh.flatassembler.net
Assembly language visual programming.
_______________________________________________
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
http://fresh.flatassembler.net
Assembly language visual programming.
Nicolas Mailhot
2012-02-19 08:52:09 UTC
Permalink
Post by John Found
Hm, nobody knows or nobody cares?
Or it is a great secret, for the internal circle only? :D
It's probably because no one sane uses Xft directly nowadays. Xft alone is not
sufficient to display modern text, you need a shaper such as pango (directly
or via cairo) or harfbuzz to process properly modern fonts, Xft will let you
read glyphs in truetype fonts but won't know how to position them properly.
--
Nicolas Mailhot
James Cloos
2012-02-19 21:51:10 UTC
Permalink
JF> I am trying to use Xft but stuck with following problem - when I
JF> open font with XftFontOpenName and XftFontOpen functions, I can't
JF> switch antialias and hinting properties. For example, opening font
JF> with name:
JF> "FreeMono:pixelsize=16:weight=bold:antialias=false:rgba=0:slant=italic",
JF> creates a font with proper typeface, size, weight and slant, but
JF> antialiased. The other group of properties that are not settable
JF> are the hinting properties.

I suspect that this is not an Xft issue but rather a fontconfig issue,

Recent reports have states that some setting loaded via /etc/fonts/
fonts.conf cannot be overridden, whereas others can.

Try pointing at an application-specific master fonts.conf which has
minimal content. If that works, you can add additional settings to
that fonts.conf to determine what Xft can override and what it cannot.

-JimC
--
James Cloos <***@jhcloos.com> OpenPGP: 1024D/ED7DAEA6
walter harms
2012-02-20 09:51:32 UTC
Permalink
Post by James Cloos
JF> I am trying to use Xft but stuck with following problem - when I
JF> open font with XftFontOpenName and XftFontOpen functions, I can't
JF> switch antialias and hinting properties. For example, opening font
JF> "FreeMono:pixelsize=16:weight=bold:antialias=false:rgba=0:slant=italic",
JF> creates a font with proper typeface, size, weight and slant, but
JF> antialiased. The other group of properties that are not settable
JF> are the hinting properties.
I suspect that this is not an Xft issue but rather a fontconfig issue,
Recent reports have states that some setting loaded via /etc/fonts/
fonts.conf cannot be overridden, whereas others can.
Try pointing at an application-specific master fonts.conf which has
minimal content. If that works, you can add additional settings to
that fonts.conf to determine what Xft can override and what it cannot.
if this is the case the problem should be traceable with "strace".
The ability to change certain properties and other not implies
that there is bug lurking. Maybe other code can circumvent the problem
but that is certainly not the way to go.

re,
wh
Eeri Kask
2012-02-20 08:18:04 UTC
Permalink
Post by Nicolas Mailhot
Post by John Found
Hm, nobody knows or nobody cares?
Or it is a great secret, for the internal circle only? :D
It's probably because no one sane uses Xft directly nowadays. Xft alone is not
sufficient to display modern text, you need a shaper such as pango (directly
or via cairo) or harfbuzz to process properly modern fonts, Xft will let you
read glyphs in truetype fonts but won't know how to position them properly.
What is wrong with using XftDrawString8() if letterspacing is not a big
issue (like with monospaced typefaces)?

Curiously, do pango and cairo / harfbuzz support modern shaping like of
the quality found in the HZ-algorithm (to justify their use in this
regard)? :-)

Eeri Kask
Nicolas Mailhot
2012-02-20 10:24:31 UTC
Permalink
Post by Eeri Kask
Post by Nicolas Mailhot
Post by John Found
Hm, nobody knows or nobody cares?
Or it is a great secret, for the internal circle only? :D
It's probably because no one sane uses Xft directly nowadays. Xft alone is not
sufficient to display modern text, you need a shaper such as pango (directly
or via cairo) or harfbuzz to process properly modern fonts, Xft will let you
read glyphs in truetype fonts but won't know how to position them properly.
What is wrong with using XftDrawString8()
It's missing all the rules to properly position glyphs in relation to one
another according to unicode and truetype extended features.

XftDrawString uses freetype directly, but the freetype shaping engine has been
deprecated a long time ago (it's been spun out in what became pango, and
harfbuzz is a rewrite merging pango with the code QT people had written to do
the same thing)
--
Nicolas Mailhot
Loading...