Ubuntu – Configure fontconfig to ignore bitmaps in scalable fonts


I have the Microsoft C-Fonts installed, and they're wonderful. However, Calibri appears as a bitmap font in a lot of the sizes that it appears. How do I tell fontconfig to forbid Calibri (and Cambria,etc.) from being rendered from the embedded bitmaps? I already have 70-no-bitmaps.conf in my /etc/fonts/conf.d/ directory.

The fonts in question can be extracted from the PowerPoint Viewer.

Best Answer

/etc/fonts/conf.d/70-no-bitmaps.conf only rejects bitmap fonts, they don't disable embedded bitmaps, which is the case here. I don't know why they didn't put the setting to disable embedded bitmaps in the same conf file. Anyways, put the following in your ~/.config/fontconfig/conf.d/20-no-embedded.conf (or, for older versions of Ubuntu, in ~/.fonts.conf.d/20-no-embedded.conf):

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

This will disable embedded bitmap for all fonts. If you want to disable only for select fonts, add <test> element:

<test name="family" compare="contains">

before <edit ....

Related Question