Bug 455819 - Font substitution in open office not working
Font substitution in open office not working
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: openoffice.org (Show other bugs)
9
All Linux
low Severity low
: ---
: ---
Assigned To: Caolan McNamara
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-17 20:37 EDT by Christian Lupien
Modified: 2009-03-05 01:55 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-16 07:37:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
this patch might do the right thing (1.02 KB, patch)
2008-07-18 06:01 EDT, Caolan McNamara
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
OpenOffice.org 98139 None None None Never

  None (edit)
Description Christian Lupien 2008-07-17 20:37:54 EDT
Description of problem:
In openoffice writer (that is the one I played with), there is a menu for font
substitutions/replacements (tool->options->OpenOffice.org->Fonts). 
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):
openoffice.org-writer-2.4.1-17.4.fc9.i386
  or the version from openeoffice.org directly
openoffice.org-writer-2.4.1-9310.i586


How reproducible:
Always


Steps to Reproduce:
1-Create a new document (writer) containing a few sentences with different fonts
like:
 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.
 
Actual results:
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
  SAL_DISABLE_FC_SUBST=1 ooffice 
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)


Expected results:
I expect the fedora version to produce the same results as 
 SAL_DISABLE_FC_SUBST=1 ooffice
but without using the environment variable

Obviously there seem to be some problems with fontconfig

Additional info:
see <a
href="https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/126784/comments/11">
comment 11</a> of <a
href="https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/126784">
Ubuntu bug 126784</a>.
Another <a href="http://www.oooforum.org/forum/viewtopic.phtml?t=61172">related
forum</a>
Comment 1 Caolan McNamara 2008-07-18 04:34:36 EDT
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
Comment 2 Caolan McNamara 2008-07-18 06:01:16 EDT
Created attachment 312115 [details]
this patch might do the right thing
Comment 3 Christian Lupien 2008-07-18 12:39:02 EDT
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?
Comment 4 Caolan McNamara 2008-07-18 12:49:23 EDT
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.
Comment 5 Christian Lupien 2008-07-22 19:15:46 EDT
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.


Comment 6 Caolan McNamara 2009-01-16 07:37:33 EST
Going to take this upstream to hdu to see if my proposed fix makes sense
Comment 7 arbeels-zoo 2009-03-05 01:55:43 EST
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.

Note You need to log in before you can comment on or make changes to this bug.