12 April 2014: The OpenOffice Wiki is not, and never was, affected by the heartbleed bug. Users' passwords are safe and wiki users do not need take any actions.

Font-FAQ

From Apache OpenOffice Wiki
Jump to: navigation, search

This is the place where the work on the Font-FAQ for OpenOffice.org 2.x (*nix) will happen. Eventually it will replace the Font Trouble Shooting Guide prepared for OpenOffice.org 1.x.

Feel free to fill out missing items, suggest new ones or correct mistakes and fix typos! If one has other suggestions, feel free to use the discussion page.

Note: OpenOffice.org is abbreviated as "OOo" in this article.


Contents

Adding Fonts

How do I add fonts to OpenOffice.org 2 exclusively?

There are two choices: Either for all users of OOo or only for a single user. If one intends to add the fonts ...

  • for all users of OOo (but only within OOo, put the fonts into the directory
/opt/openoffice.org2.0/share/fonts/truetype/
  • only for one single user of OOo, put the fonts into the directory
~/.openoffice.org2/user/fonts/

Instead of moving around the fonts manually, one can use the Printer Administration tool "spadmin" to install the fonts. If one cannot find a "OpenOffice.org Printer Administration" launcher in the desktop's menu, one can launch it manually by executing

/opt/openoffice.org2.0/program/spadmin

How do I add fonts to one user's desktop exclusively?

When using fontconfig (which is the case for virtually every modern/current distribution), it is sufficient to place the fonts in the directory

~/.fonts/

If it doesn't exist already, create it. After adding or removing fonts, one should regenerate the font-cache of that directory by running

fc-cache ~/.fonts/

How do I add fonts system-wide?

To make the fonts available system-wide, one must add the fonts to a directory that is included in the global configuration file(s). Usually, one can find that file (fonts.conf) here:

/etc/fonts/fonts.conf

As stated in the file, you should not modify that file. Instead, modify the file local.conf instead (create it in the same directory if it doesn't exist already). But have a look at the default one for the syntax, etc. If one does not want to add the font to one of the already listed directories, then just create the directory and add that one to

/etc/fonts/local.conf

Let's say one decided to copy the fonts to the directory "/usr/local/share/myfonts"; then one would add

<dir>/usr/local/share/myfonts</dir>

to "/etc/fonts/local.conf"

As when adding the fonts for a single user only, one should create the font-cache to speed up font-lookup. Keeping with the example, one would run

fc-cache /usr/local/share/myfonts/

Where can I find fonts for OpenOffice.org 2?

One can install multiple fonts using the wizard "File|Wizards → Install Fonts from the Web". This includes the "Core Fonts" from Microsoft, obtainable from http://corefonts.sourceforge.net/, and many others.

These links may be useful in searching for fonts that cover a special language:

SIL has a couple of high-quality fonts as well, some of them are worth mentioning individually:

Linux and XP users may be able to download and install Vista (Office 2007) fonts (Calibri, etc.).


Font Fallback

What is Font Fallback in OpenOffice.org 2?

Font-Fallback kicks in whenever a font is requested that is not installed on the system. (Not installed means: not available to OOo).

OOo then tries to use a different font from the ones that OOo knows about that matches the requested one as close as possible.

How does Font Fallback work?

For font-fallback to produce satisfying results, OOo somehow has to know about similarities of fonts. OOo must know that it can for example substitute Helvetica in place of Arial, but not Comic Sans. This task is not as easy as it sounds, since many fonts exist and OOo cannot know about all of them.

OOo uses several ways to find a suitable replacement:

  • Font alias information provided by the system (e.g., from a fonts.dir file)
  • Hard-coded list of fallback-fonts, from VCL.xcu (tried first)
  • Alternative font name spellings
  • Font-attributes (e.g., does it have CJK-characters, is it a Symbol-font) or style (serif/non-serif, proportional/non-proportional)

if all that fails as well:

  • use a default font

Where is the VCL.xcu in OpenOffice.org 2?

One will find the VCL.xcu in

/opt/openoffice.org2.0/share/registry/data/org/openoffice/VCL.xcu

(where "/opt/openoffice.org2.0/" is the default prefix of your installation)

How does the VCL.xcu work?

The VCL.xcu includes both the default font-lists as well as the substitution lists for fallback. The replacement-lists are in <node oor:name="FontSubstitutions">

Let's look at an example:

  [..lots of lines...]
  <node oor:name="FontSubstitutions">
      [...lots of lines...]
      <node oor:name="thorndale" oor:op="replace">
        <prop oor:name="SubstFonts">
          <value>timesnewroman;times;timesroman;newyork;timmons;serif;lucidaserif;lucidabright;roman;nimbusromanno9;nimbusromanno9l;bookman;itcbookman;garamond;garamondmt;palatino</value>
        </prop>
        <prop oor:name="SubstFontsMS">
          <value>Times New Roman</value>
        </prop>
        <prop oor:name="SubstFontsPS">
          <value>Times</value>
        </prop>
        <prop oor:name="SubstFontsHTML">
          <value>serif</value>
        </prop>
        <prop oor:name="FontWeight">
          <value>Normal</value>
        </prop>
        <prop oor:name="FontWidth">
          <value>Normal</value>
        </prop>
        <prop oor:name="FontType">
          <value>Default,Standard,Normal,Serif</value>
        </prop>
      </node>
      [..lots of lines...]

The first thing one notices is that the font names listed in that section are all normalized, that means only lowercase letters with all numbers, spaces and other characters removed.

The second thing one notices is that there is not only one item with a list of replacement fonts, but also some other properties like SubstFontsMS, SubstFontsPS, SubstFontsHTML, ...

So what does all these mean?

      <node oor:name="thorndale" oor:op="replace">

starts a new section, a new set of replacements for the font "Thorndale". The property

        <prop oor:name="SubstFonts">

describes the list of fonts that could be used instead of Thorndale, when Thorndale is not installed. In the example, this would include "Times New Roman", "Times", "Times Roman", ... and finally "Palatino".

This list works the other way as well, so when one requests, e.g., Palatino, but don't have that one installed, Thorndale is a possible replacement.

The other properties are optional and describe the font in more detail or for special circumstances. If one exports the document to a Microsoft Office file format, the font given in

        <prop oor:name="SubstFontsMS">

(in this case "Times New Roman") would be specified as alternative in the document, if one prints to a PostScript printer, the font would be replaced by "Times" (most likely built-into the printer), when one exports to HTML, it would be specified as a "serif" font, etc.

How can I configure OpenOffice.org 2 to perform a specific font substitution?

If one is unhappy with the replacement that OOo performs, one can override the replacement and define a new one by using

Tools|Options → OpenOffice.org → Fonts

Check "[x] Apply Replacement Table" and type in the name of the font to be replaced, and select a font that should be the replacement from the list.
Check [x] always if the font is to be replaced, even when it is installed
Check [x] screen if the font is to be replaced on screen only

Font Replacement.png

My document using a popular Windows font looks different than on Windows

Many systems have fonts that claim to look like Windows fonts — e.g., Arial, Times New Roman or Courier New — but actually don't. It helps considerably to download and install the real fonts from Corefonts.

My document using TNR looks awful

[Add content here]

How can I find out what font OpenOffice.org 2 really uses?

[Add content here]


Glyph Fallback

Some documents contain text that is not supported by the font specified for this text. This happens often when, e.g., symbols or extended Latin characters are involved. In order to display something reasonable the characters missing in the specified font are substituted by glyphs from other fonts.

My extended Latin characters look different than the rest of my text

This happens when the font selected for text containing these extended Latin characters doesn't support them. Guessing how these unsupported characters would have looked if the font's designer had added them is almost impossible. It is about as difficult as guessing how van Gogh would have painted an image of the Chinese wall.

I see "square boxes" instead of regular characters

The text contains characters that are not supported by the selected font. OOo also didn't find a suitable alternative font for these characters.

How can I find out if Glyph Fallback works in my OpenOffice.org 2?

Select a Latin font, e.g., Arial, then type something Chinese. The Chinese text looks readable, even though Arial doesn't support any Chinese.


Freetype

What is freetype2?

[Add content here]

Is freetype2 supported in OpenOffice.org 2?

[Add content here]

What does freetype2 provide?

[Add content here]

Isn't Xorg rendering my fonts?

[Add content here]


AntiAliasing

What is AntiAliasing?

[Add content here]

Is AntiAliasing supported in OpenOffice.org 2?

[Add content here]

What are the minimum system requirements to make AntiAliasing work?

[Add content here]

Where can I configure AntiAliasing in OpenOffice.org 2?

[Add content here]

What are embedded bitmaps in fonts?

[Add content here]

How can I tweak OpenOffice.org 2 to ignore embedded bitmaps?

[Add content here]


Fontconfig

What is Fontconfig?

[Add content here]

Is Fontconfig supported in OpenOffice.org 2?

[Add content here]

What are the limitations in OpenOffice.org 2's Fontconfig support?

[Add content here]

What font is OpenOffice.org 2 using for the user interface?

[Add content here]

How can I change OpenOffice.org 2's user interface font?

Go to Tools > Options then select the Fonts category. Check "Apply replacement table" and type in "Andale sans UI" in the "Font" box and select a font in the "Replace with" box. Click the check button and enable the "Always" checkbox. Click OK to finish.

The "Replace with" font selected has to support the locales selected for your system. One would need to type in "Andale sans UI", because it is not selectable from the drop-down menu.

If I don't use Gnome 2.6, how can change the user interface font?

[Add content here]

What is font aliasing?

[Add content here]

Why aren't a few of my fonts antialiased?

[Add content here]

Which fonts on my desktop are provided by Fontconfig?

[Add content here]


Supported Fonts

Does OpenOffice.org 2 support OpenType fonts named with ".OTF" (having CFF outlines)?

No. See Bug #43029 "support PS-OpenType/OTF/(SFNT with CFF) fonts for PDF export and printing", and Bug #78858 "Display PS-OpenType fonts on UNX platforms".

As of August 2008, it looks like this support may appear in OpenOffice.org 3.2.

What workarounds are there for using OpenType ".OTF" fonts on OpenOffice.org 2?

The best one can do currently is to convert them from .otf to .ttf using something like FontForge http://fontforge.sf.net. The FontForge conversion is very good, but not lossless, with splines (the outlines of the font definition) being converted from cubic to quadratic splines. All the hinting, however, will be lost irretrievably. The automated hinting in FontForge for TrueType .ttf files is bad and worse than not using it at all. What this means is that the converted fonts will be less legible at small sizes, but print quality will not be adversely affected, except on low resolution printers. PDF and PS files generated for on-screen viewing will be affected. The hinting from cubic splines is not compatible with .ttf fonts so, it can never be ported across to the quadratic form (which all .ttf fonts must have).

If one has a small font less than 256 characters (so none of the complex Chinese, Japanese or Korean fonts) one can convert the font to a PostScript type one file (.pfb) and retain the original hints with FontForge. This is a better choice than converting it to .ttf as the splines and hints remain unchanged (therefore the change is lossless). One cannot do this reliably with larger fonts (with more than 256 characters or glyphs). To do this, these are the steps:

If the OpenType font is a CID-keyed font (most new Adobe fonts are), choose to flatten the CID map.

Re-encode it to ISO 8859-1.

Select all from the "edit" menu. Then in the "hints" menu select Don't Autohint.

Choose to generate a font as PostScript type 1 (binary).

Choose the options and make sure hints, flex hints and output AFM are enabled.

Save the font and one can install it directly into the OpenOffice usable fonts by running the "spadmin" executable in the openoffice/program/ directory or globally by whatever other mechanism one would normally use.

Does OpenOffice.org 2 support OpenType fonts named with ".TTF" (having TrueType outlines?)

Yes, to the extent that they resemble TrueType fonts (see below). This may be enough for many users.

Part of the value the OpenType format adds is that it allows fonts with better typographic controls, which can support some languages (like Indic languages or Arabic) that other formats don't support. OpenOffice 2 doesn't go very far in this direction. See Bug #16032 "OOo should support optional OpenType features" and Bug #78749 "some Latin text needs CTL processing" for more information.

Does OpenOffice.org 2 have full support of TrueType fonts?

Partially. [More details would be nice.]

Does OpenOffice.org 2 support PostScript Type 1 fonts?

Partially. For example small caps don't work. [More details would be nice.]

Are non-Unicode fonts supported in OpenOffice.org 2?

[Add content here]


Miscellaneous

Where are all the fonts installed on my system?

[Add content here]

How do I find out what fonts are installed on my system?

[Add content here]

What is a scalable font?

A scalable font (also known as outline font) is a font where the individual characters are stored in vector format. The curves and lines that the glyph consists of are described relative to each other. This has the advantage that the font can be scaled to any font size without loss of quality.

The scaling has a minor disadvantage as well: At (very) small font-sizes or zoom-factors, the individual lines may not be drawn properly on a computer monitor because of the monitor's limited resolution. Since all is scaled down equally, thin lines can "disappear" because they will be scaled to be smaller than one pixel of your monitor. High-quality fonts include hints for the rendering applications on what strokes and lines are important to recognize the character. The application now knows that it must display these lines and not make them disappear (by not scaling them down to a size smaller than a pixel of one's monitor). This is called "hinting" (PostScript-fonts) or "instructing" (TrueType fonts). A (rather technical) description is available at Fontforge. This is not a problem when printing, since printers usually operate at a much higher resolution than a computer monitor.

If one has the choice, one should prefer scalable fonts over bitmap fonts.

See also the article on Wikipedia: http://en.wikipedia.org/wiki/Outline_font

What is a bitmap font?

A bitmap font (also known as raster font) is a font where the individual characters are stored by individual pixels — a "picture" of each character is stored. This has the big disadvantage that the font only looks good at the font sizes for which it was designed.

When one chooses a different font-size, the bitmaps need to be scaled, which leads to visible artifacts (jagged lines) — just the same as when one scales a .bmp or .jpeg image. This effect is compensated to a small extent by the means of anti-aliasing, but especially at bigger font-sizes the fonts will not look as good as outline (scalable) fonts.

See also the Wikipedia article at http://en.wikipedia.org/wiki/Bitmap_font

What is a proportional font?

Characters in a proportional font have different pitches (widths). This is generally considered more aesthetic; the width of a small letter "m" should be much larger than an "i", for example. Proportional fonts are also called proportional-pitch fonts.

The opposite of a proportional font is a fixed-width font.

What is a fixed-width font?

All characters in a fixed-width font have the same pitches (widths). This is generally considered less aesthetic, but easier to implement on hardware, beginning with the first typewriters, later on cathode ray tube screens and the first generations of printers. Any character of a fixed-width font occupies exactly the same space on the output medium, like a video screen or a sheet of paper. That makes formatting much easier. Fixed width fonts tend to be still used for viewing "plain text", where tables are often created by just lining up the characters, and by computer programmers for programming. Fixed-width fonts are also called fixed-pitch fonts.

The opposite of fixed-width fonts are proportional fonts.

What are these long font names?

[Add content here]

Scrolling the font combo-box freezes OpenOffice.org 2

What can I do if scrolling the font combo-box crashes OpenOffice.org 2?

[Add content here]

Personal tools