Calibri font not rendering correctly

I am experiencing a bad rendering of the Calibri font in some scales while using LibreOffice Writer 3.6.2.2 in Ubuntu 12.10 amd64. At first I thought that the problem was in the system font rendering, but then I saw that in Evince the font was rendered correctly at all scales. Please refer to the image comparison below.


It is actually a system thing. The Calibri family and other Microsoft fonts look jagged because Freetype, the font rendering engine used by Ubuntu, takes into account by default the embedded bitmaps these fonts have inside. These bitmaps are created so the fonts can look decent with the horrid Windows’ font rendering. Here’s the fix (source):

To disable this and get correct smoothing at all sizes do this:
Create a file called .fonts.conf in the ~/.config/fontconfig directory, paste this code in it:

<match target="font" >
    <edit name="embeddedbitmap" mode="assign">
        <bool>false</bool>
    </edit>
</match>

Save the file, and log out and back in.

Thanks a lot!
I’ve finally solved this problem with only a little difference:
From Ubuntu 12.10 the user font configuration file should be ~/.config/fontconfig/fonts.conf although it should be ~/.fonts.conf in earlier versions.

1 Like

~/.config/fontconfig/fonts.conf works fine on Ubuntu 13.10. I didn’t have to log out but only close and re-open libreoffice.

The specified directory does not seem to exist on Ubuntu 16:04 (and probably above). Problem is still persistent though, any thoughts?

@igadget Just create the folder if it doesn’t exist.

1 Like

This fix isn’t working for me on LibreOffice Version: 4.2.1.1 (Ubuntu 13.10 64-bit). Abiword has the same problem, although both Kingsoft Writer and Calligra Words diplay the font fine.

A major problem for me as all my organisation’s documents have to be in Calibri 11pt as standard.

I have 7 hours of work time to Get Work Done today, and I’ve wasted 3 1/2 of that trying to solve this issue. I’ve now had to boot back into Windows just so I can Get My Work Done.

Another LibreOffice Fail unfortunately. Devs - please sort out this long-standing issue so that I can use LibreOffice as a realistic alternative to Word. That is what you want us to do, right?

This is not an answer to the question. Also, it’s not a LibreOffice problem as I have already stated, but a FreeType configuration plus a font bug. And it does not affect print output nor it modifies displaying on other systems, so I don’t really see what the big deal is.

Was not able to upvote, and wanted to say thanks. Fitoschido thank you a bunch. The answer you provided works well.
The importance of this fix got more important IMO because newer versions of Outlook, including Outlook.com (Hotmail) started using Calibri, or some other bitmap fonts per default. I am not sure what was default before, but in the last time, last few month, I am getting more and more emails written in a font which render improperly and ugly on Ubuntu (All distributin except ones which could apply this or similar workaround. Font may still render improperly, but not so ugly at least.).
Depending on email client one uses fonts render between unreadable (Google Chrome and Gmail), readable but ugly (Firefox and Gmail) and some apps show these messages ok, font nice and readable, but these clients replace the font completely I think (Geary, Thunderbird.).