[Ubuntu] [hardy] [patch] Default font "Times" does not exist

Bug #105906 reported by Milan Bouchet-Valat
6
Affects Status Importance Assigned to Milestone
openoffice.org (Ubuntu)
Fix Released
High
Unassigned
Hardy
Fix Released
High
Unassigned

Bug Description

Binary package hint: openoffice.org-writer

In Writer, the font defaults to "Times", which doesn't exist. So the font actually used is not really "Times", but "Nimbus Roman N°9 L", which used to be the default in Edgy. This makes no sense, and is confusing for the user, who will search for "Times" font and won't find it. Please set back the default font to a real font.

description: updated
Chris Cheney (ccheney)
Changed in openoffice.org:
importance: Undecided → Low
status: Unconfirmed → Confirmed
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

[Reminder] Nobody will care about this for Gutsy? This should be really easy to do.

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote : Re: [Hardy] [patch] Default font "Times" does not exist

Still present in Hardy, version 2.3.1.3-ubuntu3.

I've found the file responsible for the default font in OO.o. It's Writer.xcu from the package openoffice.org-common, installed to /usr/lib/openoffice/share/registry/data/org/openoffice/Office/Writer.xcu.

There's another file, psprint.conf, from the same package, installed to /etc/openoffice/psprint.conf, which promotes some font substitutions for common fonts. Since it used Microsoft fonts, I replaced them with our standard fonts, but I'd like somebody to check that, I don't understand when and if it's really used. Anybody knows?

So here are two patches for each file, based on latest hardy version. They replace "Time" by "Nimbus Roman No9 L", "Helvetica" by "FreeSans" (headings), and additionnally (only for substitution) "Courier" by "Nimbus Mono L". This is actually what we used before Feisty, so there shouldn't be any problem with that. Maybe when the Penguin Liberation fonts will be available, we'll be able to look further into fonts substitutions, but for now this is just what we need and these fonts are good.

Could anyone apply these patches? Any comments?

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Attached a debdiff applying the modifications proposed in the patches.

This only affects Ubuntu-specific changes: I found out this bug was introduced in
openoffice.org (2.2.0-0ubuntu1) feisty
  "* Use Times/Helvetica as the default font for writer documents (calc and
    impress still pick up the DejaVu screen font)."
(-- Matthias Klose <email address hidden> Thu, 29 Mar 2007 17:58:28 +0200):

Matthias Klose: do you remember what was the rationale for this change? It seems strange to use by default fonts we know won't be present. Much thanks!

Revision history for this message
Matthias Klose (doko) wrote : Re: [Bug 105906] Re: [Hardy] [patch] Default font "Times" does not exist

Milan schrieb:
> Attached a debdiff applying the modifications proposed in the patches.
>
> This only affects Ubuntu-specific changes: I found out this bug was introduced in
> openoffice.org (2.2.0-0ubuntu1) feisty
> "* Use Times/Helvetica as the default font for writer documents (calc and
> impress still pick up the DejaVu screen font)."
> (-- Matthias Klose <email address hidden> Thu, 29 Mar 2007 17:58:28 +0200):
>
> Matthias Klose: do you remember what was the rationale for this change?
> It seems strange to use by default fonts we know won't be present. Much
> thanks!

Hard-coding a concrete font seems to be wrong; the Times alias can be provided
by several fonts. I still think the attached patch is wrong.

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote : Re: [Hardy] [patch] Default font "Times" does not exist

You're right, this is stupid because ideally the default font should be chosen by oowriter according to what fonts are present. But since the Nimbus and Free fonts are a dependency of ubuntu-desktop, they are installed by default on all desktops and are not likely to be removed.
OTOH, using "Times" is a real issue since, although you solve the hardcoding issue, you hardcode the name of a *font* that does not exist: you're not just saying to oowriter to use the *font family* Times. Using this trick is really bad:
- users don't see the real name of the font: when they want to go back to this font from another one, they look for "Times" and don't find it - "what's this magical font?!"
- on Windows, oowriter uses a real font, "Times New Roman"
- Ubuntu should promote the free fonts it provides, and tell their names - people will understand better the issues of changing layouts when going to Windows/Office

I cannot understand your stance here: what's the point in using a "Times" alias that can match several fonts? Maybe my patch is wrong, but at least th current situation has to be solved. No other distribution is doing this, and we need to patch Debian for that.

Cheers

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Here are the files Writer.xcu and psprint.conf from Debian's OO.o 2.4 (2.4.0~rc1-1).
- Writer.xcu does not specify any fonts, so that may be the way to follow (assuming oowriter does this for us?).
- psprint.conf is similar to what we have now - maybe we should keep it as it is (I don't really understand what it is for). Maybe you were talking about this file when speaking of aliases?

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

I've just made a quick test: on Gutsy (OO.o 2.3), removing the section "DefaultFont" from the installed Writer.xcu (/usr/lib/openoffice/... and so on) makes oowriter choose by default the Nimbus and Free fonts. you can eesily check this by removing the .openoffice.org2 dir and running Writer.
So there's no need to hardcode the fonts name: simply removing the section will work. But I still don't see the point of the previous change.

Changed in openoffice.org:
assignee: nobody → ubuntu-desktop
Revision history for this message
Chris Cheney (ccheney) wrote :

Note that this also appears to be fixed in upstream so it seems to be something in ooo-build we are doing incorrectly.

Changed in openoffice.org:
assignee: ubuntu-desktop → nobody
status: Confirmed → In Progress
importance: Low → High
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :
Revision history for this message
Mantas Kriaučiūnas (mantas) wrote : Re: [Ubuntu] Default font "Times" does not exist

Milan wrote on 2008-02-03:
>when the Penguin Liberation fonts will be available, we'll be able to look further into fonts substitutions

Please, don't make any decisions until you are sure about supported characters set. Currently only DejaVu and Freefonts fonts supports most of Unicode characters, needed by most of European, Russian and other languages, while Liberation fonts include only ISO-8859-1 (ASCII) characters :(

Chris Cheney (ccheney)
Changed in openoffice.org:
status: In Progress → Fix Committed
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Chris Cheney: What does the committed fix consist in? Several issues were at stake apparently with the default font (PDF font inclusion is also affected).

Revision history for this message
Chris Cheney (ccheney) wrote :

In the version I am currently working on I have removed the patch that forced 'Times' font to be used, it now selects the best font to be used based on what you have on the system, which is the default behavior.

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

This is right for me, but to be honest, Matthias Klose thought this fix was necessary to avoid unwanted inclusion of fonts when exporting to PDF (see https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2008-March/003477.html). If you think (like I do) that the fix is worse than the original bug, just go on - and thanks for solving this.

Revision history for this message
Chris Cheney (ccheney) wrote :

If its not including fonts currently when set to 'Times' it probably is only doing so due to it not being able to determine what font to include, since it is a known upstream bug that it always includes fonts. And yes it causes enough other problems that setting it to a non-existent font is worse than the increase in PDF file size.

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.7 KiB)

This bug was fixed in the package openoffice.org - 1:2.4.0-3ubuntu1

---------------
openoffice.org (1:2.4.0-3ubuntu1) hardy; urgency=low

  [ Chris Cheney ]
  * Resynchronise with Debian (r1044). Remaining changes:
    - debian/broffice.org.postrm.in:
      . Change diversions to ubuntu bitmap filenames.
    - debian/broffice.org.preinst.in:
      . Change diversions to ubuntu bitmap filenames.
    - debian/control.in:
      . Change maintainer line.
      . Use imagemagick instead of graphicsmagick.
      . Change bzr repo location.
      . Add package openoffice.org-style-human.
      . Add replaces openoffice.org-gtk (<< 2.0.3-1) for openoffice.org-gnome
        dapper upgrade.
    - debian/control.l10n.in:
      . Add file for Ubuntu.
    - debian/control.lang.in:
      . Add L10N_COMMON to Depends.
    - debian/control.mozilla.in:
      . Add Xb-Npp-xxx tags according to "firefox distro add-on suport" spec.
    - debian/control.ubuntu-feisty.in:
      . Add file for Ubuntu.
    - debian/deppackage.postinst.in:
      . Add file for Ubuntu.
    - debian/module-po.map:
      . Add file for Ubuntu.
    - debian/ooo-build-ubuntu.diff:
      . Various Ubuntu specific changes to ooo-build.
    - debian/openoffice.org-base.mime:
      . Update and sort mime-types.
    - debian/openoffice.org-calc.mime:
      . Update and sort mime-types.
    - debian/openoffice.org-draw.mime:
      . Update and sort mime-types.
    - debian/openoffice.org-filter-binfilter.mime:
      . Update and sort mime-types.
    - debian/openoffice.org-impress.mime:
      . Update and sort mime-types.
    - debian/openoffice.org-math.mime:
      . Update and sort mime-types.
    - debian/openoffice.org-writer.mime:
      . Update and sort mime-types.
    - debian/rules:
      . Add BUILD_SPARC option.
      . Add USE_COMMON_DOCDIR option.
      . Add USE_LZMA_COMPRESS option.
      . Add support to build on lpia.
      . Add support to build l10n as a separate source.
      . Add support to chmod +x programs in debian dir.
      . Add support to uuencode binary files in ubuntu dir.
      . Add support for Ubuntu specific bitmaps.
      . Add support for openoffice.org-style-human package.
      . Add support for launchpad translations.
      . Update location of aotcompile.py file.
      . Use imagemagick instead of graphicsmagick.
      . Use openjdk-6-jre instead of icedtea-java7-jre. Closes LP: #203636
      . Various Ubuntu specific changes.
    - debian/scripts/convert2po:
      . Add file for Ubuntu.
    - debian/scripts/fix_image_rgb:
      . Use imagemagick instead of graphicsmagick.
    - debian/scripts/gsifilter.py:
      . Add file for Ubuntu.
    - debian/scripts/splitgsi:
      . Add file for Ubuntu.
    - debian/template.desktop.in:
      . Add NoDisplay=true.
  * Resynchronise with ooo-build (r12081).
    - Closes LP: #54776, #62256, #105906, #113358, #131272, #137469, #138252
      Closes LP: #148552, #154940, #160988, #175983, #194759, #197451, #197622
  * ubuntu/*:
    - Update splash screen for OOo 2.4. Closes LP: #199193
    - Various Ubuntu specific changes.

  [ Matthias Klose ]
  * ubuntu/lpi2gsi: Add templates and conversion scripts to generate
    ...

Read more...

Changed in openoffice.org:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.