[LONG] OpenOffice.org proposed changes

Alexander E. Patrakov see at the.sig
Tue Mar 30 02:08:08 PST 2004

I write this based on the CVS version of OpenOffice.org (dated March 7,
2004), but I think that my suggestions are still valid for other versions.

OpenOffice.org comes with Bitstream Vera fonts. There are two issues with

1) They are also provided by XFree86 4.4.0
2) They are completely useless for Russians since they don't contain the
needed glyphs. And if present on the system, they are picked up and used
for menus, etc. leading to strings consisting of empty squares instead of
Cyrillic characters! I can't even figure out where to click to configure
OpenOffice not to use these fonts! I think this is a _very_ severe issue.

To solve the duplication problem mentioned as (1) above, pass
--without-fonts to the config_office/configure script.

To work around the problem (2), I excluded the directory containing the
Bitstream fonts from the font path of the X server. Then OpenOffice picked
up some other font; it was looking badly, but at least readable. Note that
this problem is in the FAQ, and the user is told to configure OpenOffice to
always replace the "Andale Sans UI" font with something else. But how will
a user do that if, instead of "Preferences" and all other menu items, he
sees rows of empty squares???

For details on the font replacement algorithm and its failure, see the
vcl/source/gdi/fontcfg.cxx file in the OpenOffice sources - the table is
hard-coded there:

"Andale Sans UI;Tahoma;Arial Unicode MS;Arial;
Bitstream Vera Sans;gnu-unifont;
Interface User;Geneva;WarpSans;Dialog;Swiss;
Lucida;Helvetica;Charcoal;Chicago;MS Sans Serif;Helv;Times;
Times New Roman;Interface System"

I am not sure why OpenOffice prefers Bitstream Vera Sans over Arial - I have
only Arial, Bitstream Vera Sans, Lucida and Times New Roman among the
mentioned fonts. If anyone understands this, please explain here.

There are several probable solutions for the problem (2).

A) (not tested) Purchase the "Andale Sans UI" font from Monotype.
Unfortunately, this one is not on my pirated fonts CD - probably too new.

B) (not tested) Replace the string "Andale Sans UI" to something more
suitable in all OpenOffice source files. I am going to test that on Friday.
Feel free to race with my old Celeron 1200. Please notify me if you do so.

C) (tested and works) After the installation of OpenOffice.org
into /opt/openoffice, edit the
file /opt/openoffice/share/registry/data/org/openoffice/Office/Common.xcu

Just before the closing </oor:component-data> tag, insert the following XML

 <node oor:name="Font">
  <node oor:name="Substitution">
   <prop oor:name="Replacement" oor:type="xs:boolean">
   <node oor:name="FontPairs">
    <node oor:name="_0" oor:op="replace">
     <prop oor:name="Always" oor:type="xs:boolean">
     <prop oor:name="OnScreenOnly" oor:type="xs:boolean">
     <prop oor:name="ReplaceFont" oor:type="xs:string">
      <value>Andale Sans UI</value>
     <prop oor:name="SubstituteFont" oor:type="xs:string">

Then you will not have any worries about Bitstream Vera fonts getting picked
up. Alternatively (not tested), you can probably do the same change with
officecfg/registry/data/org/openoffice/Office/Common.xcu file in
OpenOffice.org sources. Do we want to patch other *.xcu files for
configuration tweaks?

Of course the best solution would be to teach OpenOffice team to use
fontconfig, but I doubt that I will see this in the next year.

Other goodies in the new OpenOffice.org version:

It does not depend on GPC anymore. Pass --enable-libart to
config_office/configure script to make OpenOffice use libart_lgpl instead
for polygon clipping. Status: tested and works.

--enable-libsn            Enables the use of libstartup-notification. Works.

--with-system-zlib        Use zlib already on system. Works, the
"use-system-components" patch has to be regenerated with only
freetype-related changes.

--enable-mozilla          OO.o may include a strangely hacked up mozilla
                          binary for your platform, to build with this
                          enabled, use this option.

Looks like the default is now to not include Mozilla address book, so that
the no-mozab patch is not needed. I applied it anyway before reading this
and so cannot judge definitely whether it is the case. Please test.

Alexander E. Patrakov
To get my address: echo '0!42!+/6 at 5-3.535.25' | tr [!-:] [a-z] | tr n .

More information about the blfs-dev mailing list