Red Hat Bugzilla – Bug 455819
Font substitution in open office not working
Last modified: 2009-03-05 01:55:43 EST
Description of problem:
In openoffice writer (that is the one I played with), there is a menu for font
In the fedora 9 version (and it has been like that for a while, I remember
trying this in fedora 5 with the same results), that menu has no effect.
In the version from openoffice.org directly, some fonts substitutions work.
Version-Release number of selected component (if applicable):
or the version from openeoffice.org directly
Steps to Reproduce:
1-Create a new document (writer) containing a few sentences with different fonts
This is Lucida Sans
This is DejaVu Serif
This is DejaVu Sans Mono
This is NotARealFontName
(You can choose the font names you like. And choose one that does not exists)
2-Now open the font substitution menu and make entries to change all the above
to something else (i.e substitute "Lucida Sans" to "Nimbus Sans L", ..., and
"NotARealFontName" also to "Nimbus Sans L"). Don't forget to activate the
substitution (Apply replacement table checked and Always column checked).
3. Then select OK and look at the result.
Nothing has changed in the Fedora version.
In the version from openoffice.org all the existing fonts have changed but not
the unknown font.
If the programs are run with the following environment variable set
Then all the fonts are substituted properly. (You might have to save and reload
the file to fix some spacing problems but otherwise the change is immediate)
I expect the fedora version to produce the same results as
but without using the environment variable
Obviously there seem to be some problems with fontconfig
comment 11</a> of <a
Ubuntu bug 126784</a>.
Another <a href="http://www.oooforum.org/forum/viewtopic.phtml?t=61172">related
It does appear that the fontconfig stuff has disabled the application of the
hard font-replacement table, which should be fixed. The long-time fedora patches
for using fontconfig were integrated into upstream OOo so this shouldn't be a
fedora-specific problem anymore.
But, for reference, what exactly do you want to achieve ? The default
configuration is to take the suggestions that fontconfig gives so as to have
uniform replacements across the desktop in all apps. e.g. modifying the global
fontconfig replacements might be a better solution depending on your goals
Created attachment 312115 [details]
this patch might do the right thing
What I want to accomplish is that sometimes I get files (word documents)
containing fonts I don't have and the the fontconfig/openoffice default font
substitution is not optimal. In that case I want to play with the substitutions
to improve things.
I know how to change fontconfig manually but the files with bad fonts are not
numerous enough and I don't need to apply a change for the whole desktop (and
the fix might change from file to file)
There are no GUI to easily change the fontconfig and anyway this is just changes
that really should only apply to the openoffice application which does have a
GUI for this (except it does not work currently).
I would like to try the patch. Do I have to recompile the full openoffice or is
there a short cut I could use?
Unfortunately there's no short-cut except to build OOo :-(. I'll make a build of
this for testing soon, and mention here when it is available
I'd be interested in knowing with what fonts are you having problems with, the
classic fonts of Times New Roman, Arial and Courier New should be taken care of
with the Liberation Fonts. So I assume it is some less common fonts.
There are no particular fonts I am having trouble right now. I remember having
trouble a while back with old star office fonts (Albany, Cumberland and
Thorndale) but that is not a problem now (there are aliases and I have installed
the fonts anyway).
At the time (might have been fedora 3 or 5) I lost some time trying this
function in openoffice that simply did not work.
Since then I have checked once in a while if it was fixed. Since it was still
not fixed I decided to finally file the bug report, in the objective that if I
need this option later, it might finally be working.
Going to take this upstream to hdu to see if my proposed fix makes sense
Re: your question about what fonts people are having problems with.
I am specifically having problems with the classic fonts: Times New Roman, Arial and Courier New. The problem is precisely that these fonts are taken care of with the Liberation Fonts and I want to override that choice.
The Liberation Fonts are very hard on the eyes. I want to use something else to substitute for Times New Roman when I am editing a long document sent me by a Windows user.
Of course, my opinion about the Liberation Fonts is subjective. But fonts are very, very subjective to start with, so we should expect users to want to change default font settings, including these substitutions. This should be possible without having to use environment variables or change global system settings.
(Non-technical users, like professional editors, will expect to be able to control OOo fonts from within OOo. They will find the Font Substitution GUI, but it will fail to substitute these default fonts, with no explanation or error message. If they are really savvy, they will then go looking for some global font control in the desktop preferences menus, and find nothing there either. They will conclude that either OOo or Linux is "broken".)
Finally, in my experience the main use of the Font Substitution table is to provide local equivalents for missing fonts. This is a problem I encounter all the time with heavily formatted documents and presentations. There is almost never a need to substitute one existing font for another via the Font Substitution table, since that can be done much more effectively via styles. Unfortunately, on systems where fontconfig makes global substitutions, the Font Substitution table only works for existing fonts -- the case most users do not need.
And...thank you for the patch. I'll test it when I next have time to compile OOo.