Issue 46020

Summary: OOo doesn't use fontconfig rendering settings
Product: gsl Reporter: silverex <vaidrius>
Component: codeAssignee: hdu <hdu>
Status: CLOSED IRREPRODUCIBLE QA Contact: issues@gsl <issues>
Severity: Trivial    
Priority: P3 CC: caolanm, doko, flibby05, issues, masaya.k, ooo, ulf.stroehler
Version: OOo 2.0 BetaKeywords: oooqa
Target Milestone: AOO PleaseHelp   
Hardware: All   
OS: Linux, all   
Issue Type: ENHANCEMENT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 81913    
Description Flags
sample screenshot none

Description silverex 2005-03-25 18:00:55 UTC
OO.o 2.0 beta on Linux (official build) doesn't still (as in 1.x versions) use
fontconfig settings. For example, I have freetype compiled with bytecode
interpreter support, and I have several turned autohinter on for several fonts
in my /etc/fonts/fonts.conf, also, turned antialiasing completely off for a few
fonts. In GNOME, fonts are as I specified, but OO.o always use default settings
- like it just uses freetype directly, not through fontconfig. As I understand,
there is a fontconfig support in 2.0, so changing fontconfig settings should
change rendering in OO.o.
Comment 1 flibby05 2005-03-25 19:39:36 UTC
hhm, just a few observations:

* fontconfig-support is already integrated into 2.o (see i20361)
* m87 checks (open, access) for /etc/fonts/fonts.conf and inside referenced
local.conf and other user confs.

* i45983, user reporting that characters display correctly in Gedit, but not in
OOo, looks like duplicate of this issue

silverex, can you give me a hint how to check if fontconfig is indeed _used_ at
my system with OOo 2.0 (like willingly messing up my fonts, which i could
observe on OOo 2.0. I am not familiar with the XML definition in fonts.conf,
sorry ;-)
Comment 2 silverex 2005-03-25 19:52:09 UTC
in /etc/fonts/local.conf, put this element (as a child to <fontconfig> tag):

<match target="font">
    <test name="family"><string>Verdana</string></test>
    <edit name="antialias" mode="assign"><bool>false</bool></edit>

this should uncover most obvious difference - antialiasing turned completely off
for that font. Try comparing various font sizes then in GNOME font selector and

One notice: this might be related to issue #16032: Fontconfig supports OpenType
fonts with PostScript outlines (*.otf), but OO.o does not show them in font
selector (GNOME font selector shows them).
Comment 3 flibby05 2005-03-25 23:09:53 UTC
confirm with m87,

to reproduce put .fonts.conf with the following content in ~home (disables
antialiasing for all fonts):

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<match target="font">
<edit name="antialias" mode="assign">
Comment 4 flibby05 2005-03-25 23:11:30 UTC
Created attachment 24282 [details]
sample screenshot
Comment 5 flibby05 2005-03-25 23:23:09 UTC
*** Issue 45983 has been marked as a duplicate of this issue. ***
Comment 6 mci 2005-03-29 07:21:17 UTC
Hi silverex,
thanks for using and supporting

reassigned to us

mci -> us: 
Hi us,
since fonts and fonthandling are in your area I assign this issue to you...
please take over, thanks...
Comment 7 mci 2005-03-29 07:22:16 UTC
reassigned to us
Comment 8 ulf.stroehler 2005-03-29 10:42:16 UTC
Fontconfig support in OO.o 2.0 is actually limited to font family names which we
parse from the fontconfig api.

See issue 42835 for another fontconfig related enhancement in OO.o.

@SSA: pls. discuss with KA and PL how we'll proceed with fontconfig support. Thanks.
Comment 9 silverex 2005-04-15 17:10:43 UTC
Also, many people are using LCD monitors nowadays. OOo always renders fonts with
plain grayscale rendering, which, to say the least, doesn't look good on LCD
monitors, and definitely worse than in other GNOME/KDE applications. There seems
to be no way of enabling subpixel rendering except to change hardcode it in
freetype's defaults and recompile OOo, which is not quite as usable as just
changing one fontconfig setting.
Comment 10 stephan_schaefer 2005-05-26 10:16:20 UTC
retarget due to limited resources
Comment 11 doko 2005-11-02 01:01:22 UTC
[add reference to]
Comment 12 stephan_schaefer 2005-12-02 16:46:43 UTC
ssa: reassign to hdu
Comment 13 caolanm 2008-01-07 17:49:16 UTC
wrt. the various fontconfig settings, I think we honour them all by now except
for the ones that are suggested to be added by issue 64508 which adds the
missing subpixel ones. With that in place we call freetype to open the font
exactly the same as e.g. cairo does given the same fontconfig settings.

But even after that one is added we will still not render the same as e.g. cairo
where the subpixel stuff is implemented to achieve the non-grayscale rendering.
To make that happen I suspect we basically need to do the same as pango does,
i.e. figure out the positioning of where we want to put the glyphs, but call
cairo directly to render each glyph for us (i.e. at approximately the
X11SalGraphics::DrawServer*String level) through cairo instead of directly to
XRender, something of that nature would fill in the last piece of this puzzle.
With a bit of luck I might demo something like this up in the coming months.

Finally, of course, a "vanilla" OOo will use its own freetype with whatever
configure time settings were selected, so if the built-in freetype has some
features disabled then it may not function the same as the "system" one, but
that's not relevant to a distro spin but worth mentioning.
Comment 14 2008-05-09 08:03:37 UTC
I agree with Caolan's comment above => current builds have it
Comment 15 2008-05-09 08:04:28 UTC