Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 491594 - libmagic does not recognize ttc files as font files
Summary: libmagic does not recognize ttc files as font files
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: file
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Novotny
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F11Target 491510
TreeView+ depends on / blocked
 
Reported: 2009-03-23 08:35 UTC by Nicolas Mailhot
Modified: 2009-03-23 14:28 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 491510
Environment:
Last Closed: 2009-03-23 14:28:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
added font magic (deleted)
2009-03-23 12:54 UTC, Daniel Novotny
no flags Details | Diff

Description Nicolas Mailhot 2009-03-23 08:35:24 UTC
libmagic does not recognize ttc files as font files

This is necessary for font autoprovides to work with ttc files

http://fedoraproject.org/wiki/Features/AutomaticFontInstallation

+++ This bug was initially created as a clone of Bug #491510 +++

The new font autoprovides are working well for some font formats but are not processing others:
1. ttc files: http://koji.fedoraproject.org/koji/rpminfo?rpmID=1026593
2. pfa files: http://koji.fedoraproject.org/koji/rpminfo?rpmID=1126190
3. compressed pcf fonts: http://koji.fedoraproject.org/koji/rpminfo?rpmID=1054305
(and probably plain pcf fonts though I could not locate a pcf package that was properly converted yet)

--- Additional comment from nicolas.mailhot on 2009-03-22 08:52:40 EDT ---

Also, it seems to fail even for plain ttf files, when they have a space in their name: http://koji.fedoraproject.org/koji/rpminfo?rpmID=1055798

--- Additional comment from pmatilai on 2009-03-23 02:28:14 EDT ---

The problem with .ttc and .pfa is that neither is seen as font data by libmagic:
[pmatilai@localhost cjkuni-ukai-fonts-0.2.20080216.1]$ file ukai.ttc 
ukai.ttc: data
[pmatilai@localhost culmus-0.102]$ file YehudaCLM-Bold.pfa
YehudaCLM-Bold.pfa: PostScript document text

These should be treated filed against "file" (libmagic), rpm will recognize them as fonts as soon as libmagic does.

Compressed files aren't currently being looked into. I initially enabled it when enabling the font provide stuff but it blew up at least openoffice.org build due to leaking file descriptors someplace (probably libmagic but haven't had a chance to look at it).

Spaces in filenames causing issues is likely to be something entirely different, lets not pile things up.

--- Additional comment from nicolas.mailhot on 2009-03-23 04:31:25 EDT ---

Ok, let's split this

Comment 1 Daniel Novotny 2009-03-23 08:53:26 UTC
to be precise: if I understand correctly, the output of file(1) has to contain the string "font" in order for the automatic system to determine it's a font file, or are there any other requirements?

Comment 2 Panu Matilainen 2009-03-23 10:18:30 UTC
Strings matching " font" or " Font" are currently recognized as font by rpm (rpm uses magic_file() btw, not file command).

Comment 3 Daniel Novotny 2009-03-23 12:54:24 UTC
Created attachment 336284 [details]
added font magic

Comment 4 Daniel Novotny 2009-03-23 14:28:28 UTC
fixed in file-5.00-5.fc11


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