Bug 680460 - Not respecting lcdfilter/subpixeling fontconfig settings
Summary: Not respecting lcdfilter/subpixeling fontconfig settings
Alias: None
Product: Fedora
Classification: Fedora
Component: libreoffice
Version: 15
Hardware: Unspecified
OS: Linux
Target Milestone: ---
Assignee: Caolan McNamara
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2011-02-25 16:25 UTC by Tomáš Bžatek
Modified: 2015-03-03 22:58 UTC (History)
4 users (show)

Fixed In Version: poppler-0.16.3-1.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-03-29 03:55:52 UTC
Type: ---

Attachments (Terms of Use)
Screenshot of LibreOffice (151.50 KB, image/png)
2011-02-25 16:25 UTC, Tomáš Bžatek
no flags Details
Screenshot of gedit (183.92 KB, image/png)
2011-02-25 16:25 UTC, Tomáš Bžatek
no flags Details
pic of results (195.49 KB, image/png)
2011-03-16 15:55 UTC, Caolan McNamara
no flags Details

Description Tomáš Bžatek 2011-02-25 16:25:07 UTC
Created attachment 481027 [details]
Screenshot of LibreOffice

Libreoffice doesn't respect fontconfig settings and renders fonts differently than other apps.

-- this is a followup for upstream https://bugzilla.gnome.org/show_bug.cgi?id=640133

Steps to Prepare:
First, you need to enable FT_CONFIG_OPTION_SUBPIXEL_RENDERING define in
freetype sources to actually see the difference and recompile. For Gentoo, just
put '-bindist' in your USE flags. For Fedora, pass '--with subpixel_rendering'
on rpmbuild command-line or edit the spec file. I'm testing with bytecode
intepreter enabled (Fedora since freetype-2.4.4-3.fc16, Gentoo with

Then you need to set fontconfig:
 1. enable sub-pixel rendering in fontconfig, usually
 2. set 'lcdfilter' option to 'lcddefault'
 3. set 'hinting' option to 'true' (for TrueType or for everything)
 4. set 'hintstyle' option to  'hintfull'

This could be also done via gnome 2.x control-center or by putting the
following contents in /etc/fonts/local.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
  <match target="font">
    <edit mode="assign" name="lcdfilter">
    <edit mode="assign" name="hinting">
    <edit mode="assign" name="hintstyle">

Version-Release number of selected component (if applicable):

Steps to Reproduce:
1. Prepare your freetype setup, set hinting to full and lcdfilter to default
2. Run libreoffice, put some text there
3. Run some other text editor, like gedit, put some text there
4. Notice the rendering differences, namely antialiasing filtering
Actual results:
See libreoffice.png

Expected results:
See gedit.png

Additional info:
There were also concerns some time ago in https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/271283

Comment 1 Tomáš Bžatek 2011-02-25 16:25:29 UTC
Created attachment 481028 [details]
Screenshot of gedit

Comment 3 Caolan McNamara 2011-03-01 16:59:33 UTC
will fiddle with this when I get a chance

Comment 4 Caolan McNamara 2011-03-02 15:15:26 UTC
Ugh, this may take some time, bgr makes me feel ill

Comment 5 Caolan McNamara 2011-03-02 20:11:22 UTC
We use cairo-ft-font-face-create-for-ft-face with flags derived from the fontconfig settings + cairo_set_font defaults pulled from the gdk settings. For all this to work we probably really instead need to use cairo_ft_font_face_create_for_pattern and hold onto the original pattern + set FC_FT_FACE with the faceid we want to use.

Comment 6 Caolan McNamara 2011-03-16 15:55:59 UTC
Created attachment 485773 [details]
pic of results

Comment 7 Caolan McNamara 2011-03-16 15:57:19 UTC
changes checked in upstream for libreoffice 3.4, backported to libreoffice-

screenshot as above is what I get now

Comment 8 Fedora Update System 2011-03-22 10:12:01 UTC
poppler-0.16.3-1.fc15,libreoffice-,ufraw-0.18-2.fc15,vtk-5.6.1-5.fc15,apvlv-,calibre-0.7.44-3.fc15,ease-0.4-4.fc15,epdfview-0.1.7-13.20100621svn.fc15,evince-2.91.92-2.fc15,gambas2-2.22.0-6.fc15,gdcm-2.0.16-17.fc15,gimp-2.6.11-8.fc15,gloobus-preview-0.4.1-13.fc15,gnome-commander-,gummi-0.5.5-4.fc15,inkscape-0.48.1-4.fc15,koffice-2.3.3-2.fc15,libextractor-0.6.2-1508.fc15,OpenSceneGraph-2.8.3-10.fc15,pdf2djvu-0.7.4-7.fc15,pdf2svg-0.2.1-11.fc15,pypoppler-0.12.1-11.fc15,referencer-1.1.6-15.fc15,rubygem-poppler-0.90.8-2.fc15,texlive-2007-62.fc15,texmaker-2.1-5.fc15,texmakerx-2.0-6.fc15,tracker-0.10.3-2.fc15,vifir-0.8-1.fc15,xournal-0.4.5-12.fc15,zathura- has been submitted as an update for Fedora 15.

Comment 9 Fedora Update System 2011-03-23 13:22:21 UTC
libreoffice- has been submitted as an update for Fedora 15.

Comment 10 Fedora Update System 2011-03-29 03:55:37 UTC
libreoffice- has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2011-03-29 03:57:19 UTC
poppler-0.16.3-1.fc15, ufraw-0.18-2.fc15, vtk-5.6.1-5.fc15, apvlv-, calibre-0.7.44-3.fc15, ease-0.4-4.fc15, epdfview-0.1.7-13.20100621svn.fc15, gdcm-2.0.16-17.fc15, gimp-2.6.11-8.fc15, gloobus-preview-0.4.1-13.fc15, gnome-commander-, gummi-0.5.5-4.fc15, inkscape-0.48.1-4.fc15, koffice-2.3.3-2.fc15, libextractor-0.6.2-1508.fc15, OpenSceneGraph-2.8.3-10.fc15, pdf2djvu-0.7.4-7.fc15, pdf2svg-0.2.1-11.fc15, pypoppler-0.12.1-11.fc15, referencer-1.1.6-15.fc15, rubygem-poppler-0.90.8-2.fc15, texlive-2007-62.fc15, texmaker-2.1-5.fc15, vifir-0.8-1.fc15, xournal-0.4.5-12.fc15, zathura-, gambas2-2.22.0-7.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.