Difference between revisions of "Font-FAQ"

From Apache OpenOffice Wiki
Jump to: navigation, search
(copyedit - style, grammar, terminology)
 
(12 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 
{{Documentation/Candidate}}
 
{{Documentation/Candidate}}
This is the place where the work on the '''Font-FAQ''' for [[OpenOffice.org]] 2.x (*nix) will happen. Eventually it will replace the [http://www.openoffice.org/FAQs/fontguide.html Font Trouble Shooting Guide] prepared for OOo 1.x.  
+
This is the place where the work on the '''Font-FAQ''' for [[OpenOffice.org]] 2.x (*nix) will happen. Eventually it will replace the [http://www.openoffice.org/FAQs/fontguide.html 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 [[Talk:Font-FAQ|discussion page]].
 +
 
 +
'''Note:'''  OpenOffice.org is abbreviated as "OOo" in this article.
  
Feel free to fill out missing items, suggest new ones or correct mistakes and fix typos!  If you have other suggestions, feel free to use the discussion-page.
 
  
 
= Adding Fonts =
 
= Adding Fonts =
== How do I add fonts to OpenOffice.org 2 exclusively ==
+
== How do I add fonts to OpenOffice.org 2 exclusively? ==
There are two choices: Either for all users of OOo or only for one single user.
+
There are two choices: Either for all users of OOo or only for a single user.
If you intend to add the fonts...
+
If one intends to add the fonts ...
 
* for all users of OOo (but only within OOo, put the fonts into the directory
 
* for all users of OOo (but only within OOo, put the fonts into the directory
 
  /opt/openoffice.org2.0/share/fonts/truetype/
 
  /opt/openoffice.org2.0/share/fonts/truetype/
Line 13: Line 16:
 
  ~/.openoffice.org2/user/fonts/
 
  ~/.openoffice.org2/user/fonts/
  
Instead of moving around the fonts manually, you can as well use the Printer Administration tool "spadmin" to install the fonts. If you cannot find a "OpenOffice.org Printer Administration" launcher in your desktop's menu, you can lauch it manually by executing
+
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
 
  /opt/openoffice.org2.0/program/spadmin
  
== How do I add fonts to one user's desktop exclusively ==
+
== How do I add fonts to one user's desktop exclusively? ==
When using fontconfig (which is the case for virtually every modern/current distribution out there), it is sufficient to place the fonts in the directory
+
When using fontconfig (which is the case for virtually every modern/current distribution), it is sufficient to place the fonts in the directory
 
  ~/.fonts/
 
  ~/.fonts/
If it doesn't exist already, create it. After adding or removing fonts, you should regererate the font-cache of that directory by running
+
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/
 
  fc-cache ~/.fonts/
  
== How do I add fonts system wide ==
+
== How do I add fonts system-wide? ==
To make the fonts available system-wide, you have to add the fonts to a directory that is included in the global configuration file(s). Usually, you can find that file (fonts.conf) here:
+
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
 
  /etc/fonts/fonts.conf
As stated in the file itself, '''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.
+
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 you don't want to add your font to one of the already listed directories, then just create the directory and add that one to  
+
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
 
  /etc/fonts/local.conf
Let's say you decided to copy your fonts to the directory "/usr/local/share/myfonts", then you would add
+
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>
 
  <dir>/usr/local/share/myfonts</dir>
 
to "/etc/fonts/local.conf"
 
to "/etc/fonts/local.conf"
  
As when adding the fonts for a single user only, you should create the font-cache to speed up font-lookup. Keeping with the example, you would run
+
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/
 
  fc-cache /usr/local/share/myfonts/
and you're done.
 
  
== Where can I find fonts for OpenOffice.org 2 ==
+
== Where can I find fonts for OpenOffice.org 2? ==
You can install a bunch of fonts using the wizard "File|Wizards → Install Fonts from the Web". This includes the "Core Fonts" from Microsoft (can be obtained from http://corefonts.sourceforge.net/) and many others.
+
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.
  
If you're looking for fonts that cover a special language, I'm sure you'll find these links useful:
+
These links may be useful in searching for fonts that cover a special language:
 
* http://www.alanwood.net/unicode/fonts.html
 
* http://www.alanwood.net/unicode/fonts.html
 
* http://www.wazu.jp/
 
* http://www.wazu.jp/
Line 50: Line 52:
  
 
Linux and XP users may be able to [http://www.oooninja.com/2008/01/calibri-linux-vista-fonts-download.html download and install Vista (Office 2007) fonts] (Calibri, etc.).
 
Linux and XP users may be able to [http://www.oooninja.com/2008/01/calibri-linux-vista-fonts-download.html download and install Vista (Office 2007) fonts] (Calibri, etc.).
 +
  
 
= Font Fallback =
 
= Font Fallback =
== What is this Font Fallback in OpenOffice.org 2 ==
+
== 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).
 
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.
 
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 ==
+
== 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 substitue Arial by Helvetica, but not with Comic Sans. This task is not as easy as it sounds, since there are very many fonts out there and OOo cannot know about all of them.
+
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:
 
OOo uses several ways to find a suitable replacement:
  
* font alias information provided by the system (e.g. from a [http://docs.hp.com/en/B1171-90076/ch06s04.html fonts.dir] file)
+
* Font alias information provided by the system (e.g., from a [http://docs.hp.com/en/B1171-90076/ch06s04.html fonts.dir] file)
* hard-coded list of fallback-fonts, from VCL.xcu (tried first)
+
* Hard-coded list of fallback-fonts, from VCL.xcu (tried first)
* alternative font name spellings
+
* 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)
+
* 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:
 
if all that fails as well:
 
* use a default font
 
* use a default font
  
== Where is the VCL.xcu in OpenOffice.org 2 ==
+
== Where is the VCL.xcu in OpenOffice.org 2? ==
You'll find the VCL.xcu in
+
One will find the VCL.xcu in
 
  /opt/openoffice.org2.0/share/registry/data/org/openoffice/VCL.xcu
 
  /opt/openoffice.org2.0/share/registry/data/org/openoffice/VCL.xcu
 
(where "/opt/openoffice.org2.0/" is the default prefix of your installation)
 
(where "/opt/openoffice.org2.0/" is the default prefix of your installation)
  
== How does the VCL.xcu work ==
+
== How does the VCL.xcu work? ==
The VCL.xcu includes both the default font-lists as well as the substitiution lists for fallback. The replacement-lists are in '''<node oor:name="FontSubstitutions">'''  
+
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:
 
Let's look at an example:
Line 109: Line 112:
 
</source>
 
</source>
  
The first think you notice is that the <code>fontnames</code> listed in that section are all normalized, that means <b>only lowercase letters</b> with all numbers, spaces and other characters removed.
+
The first thing one notices is that the <b>font names</b> listed in that section are all normalized, that means <b>only lowercase letters</b> with all numbers, spaces and other characters removed.
  
Second thing you notice is that there is not only one item with a list of replacement fonts, but also some other properties like <code>SubstFontsMS</code>, <code>SubstFontsPS</code>, <code>SubstFontsHTML</code>,...
+
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 <code>SubstFontsMS</code>, <code>SubstFontsPS</code>, <code>SubstFontsHTML</code>,&nbsp;...
  
So what does all these mean?  
+
So what does all these mean?
  
 
<source lang="xml">
 
<source lang="xml">
Line 126: Line 129:
 
</source>
 
</source>
  
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".
+
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",&nbsp;... and finally "Palatino".
  
This list works the other way as well, so when you request e.g. Palatino but don't have that one installed, Thorndale is a possible replacement.
+
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 you export the document to a Microsoft Office Format, the font given in  
+
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
  
 
<source lang="xml">
 
<source lang="xml">
Line 136: Line 139:
 
</source>
 
</source>
  
(in this case "Times New Roman") would be specified as alternative in the document, if you print to a postscript printer, the font would be replaced by "Times" (most likely built-into the printer), when you export to HTML, it would be specified as a "serif" font, etc.
+
(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 ==
+
== 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
If you're not happy with the replacement that OOo does, you can override the replacement and define a new one of your choice by using  
+
 
  Tools|Options → OpenOffice.org → Fonts
 
  Tools|Options → OpenOffice.org → Fonts
  
check "[x] Apply Replacement Table" and type in the name of the font you want to replace, and select a font that should be the replacement from the list.
+
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.<br>
 
+
Check [x] always if the font is to be replaced, even when it is installed<br>
check [x] always if you want the font to be replaced, even when it is installed
+
Check [x] screen if the font is to be replaced on screen only
check [x] screen if you want the font to be replaced on screen only
+
 
+
  
 
[[Image:Font_Replacement.png]]
 
[[Image:Font_Replacement.png]]
 
 
  
 
== My document using a popular Windows font looks different than on Windows ==
 
== My document using a popular Windows font looks different than on Windows ==
 
+
Many systems have fonts that claim to look like Windows fonts&nbsp;— e.g., Arial, Times New Roman or Courier New&nbsp;— but actually don't. It helps considerably to download and install the real fonts from [[#Where_can_I_find_fonts_for_OpenOffice.org_2.3F|Corefonts]].
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 [[Font-FAQ#Where_can_I_find_fonts_for_OpenOffice.org_2|Corefonts]].
+
  
 
== My document using TNR looks awful ==
 
== My document using TNR looks awful ==
== How can I find out what font OpenOffice.org 2 really uses ==
+
''<font color="magenta">[Add content here]</font>''
  
= Glyph Fallback =
+
== How can I find out what font OpenOffice.org 2 really uses? ==
 +
''<font color="magenta">[Add content here]</font>''
  
Some documents contain text that is not supported by the font specified for this text. This happens often when e.g. [http://www.unicode.org/versions/Unicode4.0.0/ch14.pdf symbols] or [http://www.unicode.org/charts/PDF/U0100.pdf 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 ==
+
= Glyph Fallback =
 +
Some documents contain text that is not supported by the font specified for this text. This happens often when, e.g., [http://www.unicode.org/versions/Unicode4.0.0/ch14.pdf symbols] or [http://www.unicode.org/charts/PDF/U0100.pdf 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.
  
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 [http://en.wikipedia.org/wiki/Vincent_van_Gogh van Gogh] would have painted an image of the Chinese wall.
+
== 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 [http://en.wikipedia.org/wiki/Vincent_van_Gogh van Gogh] would have painted an image of the Chinese wall.
  
 
== I see "square boxes" instead of regular characters ==
 
== 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.
 
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 ==
+
== 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
+
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 =
 
= Freetype =
== What is freetype2 ==
+
== What is freetype2? ==
== Is freetype2 supported in OpenOffice.org 2 ==
+
''<font color="magenta">[Add content here]</font>''
== What does freetype2 provide ==
+
== Isn't Xorg rendering my fonts ==
+
== What types of fonts are supported in OpenOffice.org 2 ==
+
== Are OTF fonts supported in OpenOffice.org 2 ==
+
Not yet if they are postscript fonts (as virtually all of them are). The best you 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 irrevocably. 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 you have a small font less than 256 characters (so none of the complex Chinese, Japanese or Korean fonts) you can convert the font to a postscript type one file (.pfb) and retain the origianl 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). You cannot do this reliably with larger fonts (with more than 256 characters or glyphs). To do this, these are the steps:
+
== Is freetype2 supported in OpenOffice.org 2? ==
 +
''<font color="magenta">[Add content here]</font>''
  
If the opentype font is a cid keyed font (most new adobe fonts are), choose to flatten the cid map.
+
== What does freetype2 provide? ==
 +
''<font color="magenta">[Add content here]</font>''
  
Re-encode it to ISO 8859-1.
+
== Isn't Xorg rendering my fonts? ==
 +
''<font color="magenta">[Add content here]</font>''
  
Select all from the "edit" menu. Then in the "hints" menu select Don't Autohint.
 
  
Choose to generate a font as PS type 1 (binary).
+
= AntiAliasing =
 +
== What is AntiAliasing? ==
 +
''<font color="magenta">[Add content here]</font>''
  
Choose the options and make sure hints, flex hints and output afm are enabled.
+
== Is AntiAliasing supported in OpenOffice.org 2? ==
 +
''<font color="magenta">[Add content here]</font>''
  
Save the font and you 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 you would normally use.
+
== What are the minimum system requirements to make AntiAliasing work? ==
 +
''<font color="magenta">[Add content here]</font>''
  
== Are none-Unicode fonts supported in OpenOffice.org 2 ==
+
== Where can I configure AntiAliasing in OpenOffice.org 2? ==
 +
''<font color="magenta">[Add content here]</font>''
 +
 
 +
== What are embedded bitmaps in fonts? ==
 +
''<font color="magenta">[Add content here]</font>''
 +
 
 +
== How can I tweak OpenOffice.org 2 to ignore embedded bitmaps? ==
 +
''<font color="magenta">[Add content here]</font>''
  
= AntiAliasing =
 
== What is AntiAliasing ==
 
== Is AntiAliasing supported in OpenOffice.org 2 ==
 
== What are the minimum system requirements to make AntiAliasing work ==
 
== Where can I configure AntiAliasing in OpenOffice.org 2 ==
 
== What are embedded bitmaps in fonts ==
 
== How can I tweak OpenOffice.org 2 to ignore embedded bitmaps ==
 
  
 
= Fontconfig =
 
= Fontconfig =
== What is Fontconfig ==
+
== What is Fontconfig? ==
== Is Fontconfig supported in OpenOffice.org 2 ==
+
''<font color="magenta">[Add content here]</font>''
== What are the limitations in OpenOffice.org 2's Fontconfig support ==
+
 
== What font is OpenOffice.org 2 using for the user interface ==
+
== Is Fontconfig supported in OpenOffice.org 2? ==
== How can I change OpenOffice.org 2's user interface font ==
+
''<font color="magenta">[Add content here]</font>''
 +
 
 +
== What are the limitations in OpenOffice.org 2's Fontconfig support? ==
 +
''<font color="magenta">[Add content here]</font>''
 +
 
 +
== What font is OpenOffice.org 2 using for the user interface? ==
 +
''<font color="magenta">[Add content here]</font>''
  
 +
== 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.
 
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 you select has to support the locales selected for your system. You need to type in "Andale sans UI" because it is not selectable from the drop-down menu.
+
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 though ==
+
== If I don't use Gnome 2.6, how can change the user interface font? ==
== What is font aliasing ==
+
''<font color="magenta">[Add content here]</font>''
== A few number of my fonts isn't antialiased, why ==
+
== Which fonts on my desktop are provided by Fontconfig ==
+
  
= Misc =
+
== What is font aliasing? ==
== Where are all the fonts installed on my system ==
+
''<font color="magenta">[Add content here]</font>''
== How do I find out what fonts are installed on my system ==
+
== 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 fontsize 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/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 your monitor). This is called "hinting" (Postscript-fonts) or "instructing" (TrueType Fonts). A (rather technical) description is available at [http://fontforge.sourceforge.net/hinting.html Fontforge].
+
== Why aren't a few of my fonts antialiased? ==
This is not a problem when printing, since printers usually operate at a much higher resolution than a computer monitor.
+
''<font color="magenta">[Add content here]</font>''
  
If you have the choice, you should prefer scalable fonts over bitmap fonts.
+
== Which fonts on my desktop are provided by Fontconfig? ==
 +
''<font color="magenta">[Add content here]</font>''
  
See also the article on wikipedia: http://en.wikipedia.org/wiki/Outline_font
 
  
== What is a bitmap font ==
+
= Supported Fonts =
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 it was designed for.
+
== Does OpenOffice.org 2 support OpenType fonts named with ".OTF" (having CFF outlines)? ==
 +
No.  See [http://www.openoffice.org/issues/show_bug.cgi?id=43029 Bug #43029 "support PS-OpenType/OTF/(SFNT with CFF) fonts for PDF export and printing"], and [http://qa.openoffice.org/issues/show_bug.cgi?id=78858 Bug #78858 "Display PS-OpenType fonts on UNX platforms"].
  
When you choose a different fontsize, the pixmaps need to be scaled, what leads to visible artifacts (jagged lines) - just the same as when you scale your bmp or jpeg Image. This effect is compensated to a small extend by the means of anti-aliasing, but especially at bigger fontsizes the fonts will not look as good as outline (scalable) fonts.
+
As of August 2008, it looks like this support may appear in OpenOffice.org 3.2.
  
See also the wikipedia-article at http://en.wikipedia.org/wiki/Bitmap_font
+
=== 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).
  
== What is a proportional font ==
+
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:
  
Characters in a proportional font have different ''pitches'' (widths).
+
If the OpenType font is a CID-keyed font (most new Adobe fonts are), choose to flatten the CID map.
This is generally considered more aesthetical;
+
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 [[Font-FAQ#What is a fixed-width font|fixed-width font]].
+
  
== What is a fixed-width font ==
+
Re-encode it to ISO 8859-1.
  
All characters in a fixed-width font have the same ''pitches'' (widths).  
+
Select all from the "edit" menu. Then in the "hints" menu select Don't Autohint.
This is generally considered more aesthetical,
+
 
but easier to implement on hardware,  
+
Choose to generate a font as PostScript type 1 (binary).
beginning with the first typewriters, later on CRT screens and the first generations of printers.
+
 
Any character of a fixed-width font occupies exactly the same space on the output media,  
+
Choose the options and make sure hints, flex hints and output AFM are enabled.
like a video screen or a sheet of paper.
+
 
That makes formatting much easier.
+
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.
Fixed-width fonts are also called ''fixed-pitch'' fonts.
+
 
The opposite of fixed-width fonts are [[Font-FAQ#What is a proportional font|proportional fonts]].
+
== 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 [http://www.openoffice.org/issues/show_bug.cgi?id=16032 Bug #16032 "OOo should support optional OpenType features"] and [http://www.openoffice.org/issues/show_bug.cgi?id=78749 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? ==
 +
''<font color="magenta">[Add content here]</font>''
 +
 
 +
 
 +
= Miscellaneous =
 +
== Where are all the fonts installed on my system? ==
 +
''<font color="magenta">[Add content here]</font>''
 +
 
 +
== How do I find out what fonts are installed on my system? ==
 +
''<font color="magenta">[Add content here]</font>''
 +
 
 +
== 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 [http://fontforge.sourceforge.net/hinting.html 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&nbsp;— 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)&nbsp;— 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 [[#What is a fixed-width font.3F|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 [[#What is a proportional font.3F|proportional fonts]].
 +
 
 +
== What are these long font names? ==
 +
''<font color="magenta">[Add content here]</font>''
  
== What are these long font names ==
 
 
== Scrolling the font combo-box freezes OpenOffice.org 2 ==
 
== Scrolling the font combo-box freezes OpenOffice.org 2 ==
== What can I do if scrolling the font combo-box crashes OpenOffice.org 2 ==
+
=== What can I do if scrolling the font combo-box crashes OpenOffice.org 2? ===
 +
''<font color="magenta">[Add content here]</font>''
 +
 
 +
 
 
[[Category:How to]]
 
[[Category:How to]]

Latest revision as of 16:56, 1 September 2011

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