OpenType Fonts associated as ODF Template Files

Bug #338682 reported by Mark Steadman
32
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Nautilus
Invalid
Medium
One Hundred Papercuts
Invalid
Undecided
Unassigned
shared-mime-info
Fix Released
Medium
kdebase-runtime (Ubuntu)
Invalid
Low
Unassigned
shared-mime-info (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: shared-mime-info

OpenType Fonts with file extension *.otf have file association vnd.oasis.opendocument.formula-template rather than being associated as OpenType Fonts. Previously, I could right click -> actions -> install or right click -> open with -> KFontView. This is no longer the case.

Steps to reproduce:

1) Download an open type font eg. http://www.ctan.org/get/fonts/cm/ps-type1/bakoma/otf/cmb10.otf
2) Right click in Dolphin

Expected Behavior:

KFontView should be the associated application

Observed Behavior:
OpenOffice.org Formula is the associated application

Description: Ubuntu jaunty (development branch)
Release: 9.04

shared-mime-info
 Installed: 0.60-1
  Candidate: 0.60-1
  Version table:
 *** 0.60-1 0
        500 http://us.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
Jacques L. (asdfgerv) wrote :

I can confirmed this bug in Jaunty.

Interestingly, when the ".otf" extension is removed from the filename, the file is correctly identified as "application/x-font-otf" instead of "application/vnd.oasis.opendocument.formula-template".

Changed in shared-mime-info:
status: New → Confirmed
Changed in shared-mime-info:
importance: Undecided → Low
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug report. This bug has been reported to the developers of the software. You can track it and make comments here: https://bugs.freedesktop.org/show_bug.cgi?id=20603

Changed in shared-mime-info:
status: Confirmed → Triaged
Changed in shared-mime-info:
status: Unknown → Confirmed
Revision history for this message
In , Nicolas-mailhot-laposte (nicolas-mailhot-laposte) wrote :

The gnome mime database thinks OTF files are some kind of ODF file (as
documented in the ODF spec).

However the OTF extension has long been used for OpenType fonts with CFF data,
and it's easy to check font OTF files massively outnumber ODF OTF files in the wild (and are likely to continue as OTF is used for pretty much every new font nowadays)

Therefore the default should be switched to font file.

Even OO.o uses the OTF moniker for font files
http://www.openoffice.org/issues/show_bug.cgi?id=43029

Revision history for this message
In , Nicolas-mailhot-laposte (nicolas-mailhot-laposte) wrote :

(for example I count ~ 30 packages including one or many OTF font files in Fedora, and none including ODF OTF files)

Revision history for this message
In , Bastien Nocera (hadess-deactivatedaccount) wrote :

All the mime-types associated with *.otf have magic data associated, so front-ends should be able to detect which is which by using magic in case of conflict.

Adding weight for one or the other would cause more problems than it would solve. So file a bug against the applications that fail to detect the files correctly instead.

Revision history for this message
In , Bastien Nocera (hadess-deactivatedaccount) wrote :

*** Bug 20603 has been marked as a duplicate of this bug. ***

Revision history for this message
Sebastien Bacher (seb128) wrote :

upstream says that's not a shared-mime-info bug but that bug should be opened against applications rather

Changed in shared-mime-info (Ubuntu):
status: Triaged → Invalid
Changed in shared-mime-info:
status: Confirmed → Invalid
Revision history for this message
Brian Burger (bburger) wrote :

Which applications should it be opened against?

This is still happening in Ubuntu 9.04 final release; Nautilus also identifies OTF as "OpenOffice Template" rather than a font file.

Should we be reporting this against Nautilus?

Revision history for this message
Brian Burger (bburger) wrote :

Having read the Freedesktop.org report Sebastien linked to, I'll change this report to be against Nautilus - as I'm not a KDE user, I'll leave adding KDE's filemanager to someone else.

Revision history for this message
Sebastien Bacher (seb128) wrote :

the bug is not a nautilus one, that should be opened against whatever software should open the font in your opinion

Changed in nautilus:
status: New → Invalid
Revision history for this message
In , Brian Burger (bburger) wrote :

https://bugs.launchpad.net/nautilus/+bug/338682

Over on Launchpad, Seb Bacher is saying this isn't a Nautilus/file-handling bug.

Over here, it's not a mime-type bug.

It's got to be one or the other. So which is it?

Revision history for this message
In , Brian Burger (bburger) wrote :

Copypasta from one of my comments on the Launchpad bug:

This is not a problem with the current Gnome Font Viewer, as is easily proven:
1. Find an OTF font file on your system.
2. If you just double-click on it, OpenOffice attempts to open it, and fails.
2. Right-click the OTF, go Open With -> Open With Other Application -> Font Viewer
3. Font Viewer opens and displays the OTF preview just as it should, exactly like a TTF is shown.

So I'm not sure how this bug can be Invalid against all three of the targets currently listed. It's should be valid against at least one, if not all.

(The above was all done on Ubuntu 9.04)

Revision history for this message
Brian Burger (bburger) wrote :

Does Nautilus not handle mime-type/opening issues in Gnome?

This is not a problem with the current Gnome Font Viewer, as is easily proven:
1. Find an OTF font file on your system.
2. If you just double-click on it, OpenOffice attempts to open it, and fails.
2. Right-click the OTF, go Open With -> Open With Other Application -> Font Viewer
3. Font Viewer opens and displays the OTF preview just as it should, exactly like a TTF is shown.

So I'm not sure how this bug can be Invalid against all three of the targets currently listed. It's should be valid against at least one, if not all.

This bug isn't in Font Viewer, it's in Nautilus and/or whatever mime-type definitions are being used in Ubuntu 9.04.

Revision history for this message
In , Bastien Nocera (hadess-deactivatedaccount) wrote :

It is a bug in the file managers. File a bug against them.

Revision history for this message
Sebastien Bacher (seb128) wrote :

the mimetype definition is a shared-mime-info one, what about arguing on the upstream bug rather than here?

Revision history for this message
Brian Burger (bburger) wrote :

Over on the upstream bug, Bastien Nocera says, "So file a bug against the applications that fail to detect the files
correctly instead."

Wouldn't that be Nautilus in this case, or KDE's equivilent?

I'm not trying to start an arguement, I'm puzzled - this is clearly a bug. It's a regression bug, even. Yet both upstream & here, the response is "Not ours, go elsewhere.". They claim it's not their mime type definitions at fault. You claim it's not Nautilus.

One party or another has to drop the NOTOURBUG flag, and as a user, I really don't care who does it, providing it gets accepted that yes, this is actually a bug.

OTF preview used to work, after all, before Ubuntu 8.04 wrecked font preview completely.

Changed in shared-mime-info (Ubuntu):
status: Invalid → New
Revision history for this message
Brian Burger (bburger) wrote :

Reopened with comments on Freedesktop as well, just for good measure.

Changed in nautilus:
status: Invalid → New
Revision history for this message
Mark Steadman (bugaroosa) wrote :

The package in kde I assume is kdebase-runtime. There is already a bug open for *.jar files on it.

affects: shared-mime-info (Ubuntu) → kdebase-runtime (Ubuntu)
Revision history for this message
Brian Burger (bburger) wrote :

The upstream freedesktop.org bug got closed less than a day after I reopened it, with the same 'not our problem' comment and 'NOTOURBUG' tag.

What's the Gnome equiv. of kdebase-runtime?

Revision history for this message
Brian Burger (bburger) wrote :

Opened with GNOME's bugzilla, just to attempt to get a rational response to this.

http://bugzilla.gnome.org/show_bug.cgi?id=581388

Changed in nautilus:
importance: Undecided → Unknown
status: New → Unknown
Changed in nautilus:
status: Unknown → New
Revision history for this message
Mark Steadman (bugaroosa) wrote :

Brian,

I see there is a package gnome-mime-data. Is that the equivalent gnome package?

Revision history for this message
Jan Vlnas (jnv) wrote :

I took a look a the filetypes using assoGiate, which clearly shows the problem. The mimetype application/x-font-otf doesn't have the filename pattern defined, while the application/vnd.oasis.opendocument.formula-template (which is the problematic MIME here) does have the filename pattern.
The easiest workaround is as follows: Install and run assogiate (package is in universe), find the application/x-font-otf type and edit it, at the filename tab add pattern *.otf.
I am not sure how to create regular formula template, but when I change extension of some formula document (*.odf) to .otf, it gets detected as OpenType font too, but since I almost never work with OpenOffice formulas this is not a big deal for me.

As you can see, this problem is clearly MIME related, now it depends whether the problem is in gnome-mime-data or shared-mime-info.

Revision history for this message
In , Matthias Clasen (mclasen) wrote :

Bastien,

we need to add a glob for *.otf to the font mime type too, since the current agreed-on matching algorithm only looks at magic to disambiguate if there is a glob conflict.

I tested locally that adding the glob makes otf fonts show up correctly in nautilus.

Changed in shared-mime-info:
status: Invalid → Confirmed
Revision history for this message
Jan Vlnas (jnv) wrote :

Reopened by Freedesktop, this bug isn't related to any file manager or desktop environment.

Changed in kdebase-runtime (Ubuntu):
status: New → Invalid
Changed in shared-mime-info (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Sebastien Bacher (seb128) wrote :

could people not open hundredpapercuts tasks but let the design team to do that rather?

Revision history for this message
Sebastien Bacher (seb128) wrote :

the bug there is a simple upstream issue and probably going to be fixed during the karmic cycle, not sure it's worth tagging it as hundredpapercut issue

Revision history for this message
Lightbreeze (nedhoy-gmail) wrote :

Not a paper cut as it effects a small user population.

Changed in hundredpapercuts:
status: New → Invalid
Revision history for this message
In , Bastien Nocera (hadess-deactivatedaccount) wrote :

* freedesktop.org.xml.in: Add *.otf as a glob for
OpenType fonts so file managers use magic to check
for fonts vs. OO.o documents (Closes: #20854)

Changed in shared-mime-info:
status: Confirmed → Fix Released
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Fix committed upstream for shared-mime-info 0.61

Changed in shared-mime-info (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
old_toby (simon-hornweb) wrote :

When will shared-mime-info 0.61 be in the repositories? With the newest updates on karmic, I still have 0.60.2...

Revision history for this message
Sebastien Bacher (seb128) wrote :

where do you find that 0.61? http://www.freedesktop.org/wiki/Software/shared-mime-info still has 0.60 has current version

Revision history for this message
Sebastien Bacher (seb128) wrote :

there is a newer version fixing the issue in karmic now

Changed in shared-mime-info (Ubuntu):
status: Fix Committed → Fix Released
Changed in nautilus:
status: New → Invalid
Changed in shared-mime-info:
importance: Unknown → Medium
Changed in nautilus:
importance: Unknown → Medium
Changed in shared-mime-info:
importance: Medium → Unknown
Changed in shared-mime-info:
importance: Unknown → Medium
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.