Find out which fonts OpenOffice.org is using

Q I often work on documents and spreadsheets from work that use the Microsoft fonts, Times and Arial, which I do not have. I have downloaded the Liberation fonts from Red Hat to use as replacements. After I installed them in my /usr/share/fonts/truetype folder the fonts are now available in OpenOffice.org. How can I find out which font OpenOffice.org is using instead of the Microsoft font and change that to the Liberation equivalent? Also, how can I get Firefox to use the Liberation fonts when Microsoft fonts are specified for a web page? I have read that OpenOffice.org creates smaller files than those made by Microsoft Office, but I am finding this far from the case. OpenOffice.org saves a blank .doc file at 65KB and a blank .xls spreadsheet at 95KB. What is going on here? I am using version 2.2 of OpenOffice.org.

A The tarball from Red Hat contains only the fonts - you'll need a little more to use them in place of the Microsoft fonts. How you do this depends on whether the fonts are installed globally, as you did in /usr/share/fonts, or only for a user, in ~/.fonts. In the former case, add this code to /etc/fonts/local.conf, otherwise add it to ~/.fonts/local.conf. In either case, create the file if it does not exist.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
<test qual="any" name="family"><string>Times New Roman</string></test>
<edit name="family" mode="assign"><string>Liberation Serif</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>Arial</string></test>
<edit name="family" mode="assign"><string>Liberation Sans</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>Courier</string></test>
<edit name="family" mode="assign"><string>Liberation Mono</string></edit>
</match>
</fontconfig>

This means any program that tries to load one of the Microsoft fonts will use the Liberation alternative, so all web pages will look much like their authors intended, even when you don't have any Microsoft fonts installed. It also means that you don't need to change any documents you've created in OpenOffice.org, as they can reference the Microsoft fonts and work equally well when you send them to Windows users. You can get more information on this, and the above code, at http://uwstopia.nl/blog/2007/05/free-your-fonts. In our experience, OpenOffice.org saves much smaller files than Word and Excel, but an empty file is not a typical example. Word saves a lot of redundant information in a file, so loading a document into OpenOffice.org and saving it as a .doc file will usually reduce the size, but the greatest reduction is when you use Open Document files, as these are compressed with zip.

Back to the list