Bug 505775 - enscript ships with files that use a pfa font extension but are really eps files ; the files should be renamed to foo.eps
Summary: enscript ships with files that use a pfa font extension but are really eps fi...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: enscript
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Adam Tkac
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 477382 (view as bug list)
Depends On:
Blocks: F11-new-font-rules F12Target
TreeView+ depends on / blocked
 
Reported: 2009-06-13 17:54 UTC by Nicolas Mailhot
Modified: 2013-04-30 23:43 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-30 14:19:09 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Nicolas Mailhot 2009-06-13 17:54:35 UTC
Description of problem:

file thinks the pfa file in enscript-1.6.4-12.fc11.x86_64.rpm is a "PostScript document text conforming DSC level 3.0, type EPS"

It should be identified as "PostScript Type 1 font text"

Version-Release number of selected component (if applicable):

file-5.03-2.fc12.x86_64

Full list:
./usr/share/enscript/afm/matrix.pfa	PostScript document text conforming DSC level 3.0, type EPS	enscript-1.6.4-12.fc11.x86_64.rpm

Comment 1 Daniel Novotny 2009-06-15 10:42:39 UTC
Adobe fonts, to be properly identified as fonts, have to have the right header,
for example %!PS-AdobeFont-1.1 

This file has a generic PostScript header "%!PS-Adobe-3.0".

so file does nothing wrong: it identifies the file according to the header

closing this: the file is a part of the package "enscript", so you can reassign this to this component, if you think the file format is wrong

Comment 2 James Cloos 2009-06-16 12:06:23 UTC
matrix.pfa is a type3 font, not a type1.

As such, file(1)’s current output is exactly what is desired from that file.

Comment 3 Nicolas Mailhot 2009-06-16 12:31:52 UTC
(In reply to comment #2)
> matrix.pfa is a type3 font, not a type1.
> 
> As such, file(1)’s current output is exactly what is desired from that file.  

If file's output does not include "font" the file won't be recognized by apps that rely on libmagic to identify fonts.

Right now labels for font files are:

Clean:
TTF : TrueType font data
TTC : TrueType font collection data
OTF : OpenType font data

Not:
the PS and PCF font labels are a mess but they at least include "font" somewhere" (Though the upper)

Comment 4 Nicolas Mailhot 2009-06-16 12:32:45 UTC
(Though the upper F in Font for PCF is an annoyance)

Comment 5 James Cloos 2009-06-16 15:45:07 UTC
But which apps on the system can handle type3 fonts?

They are only useful for embedding in PostScript files, since a full PS interpreter is required to render them.

(There may be some ΤεΧware in the wild which can handle the subset of type3 fonts which dvips will produce from mf bitmaps, but not vector-style type3s.)

As such, the file in question should be handled like any eps file — which is probably why it is declared as eps — rather than like a font.

Comment 6 Nicolas Mailhot 2009-06-17 10:47:13 UTC
(In reply to comment #5)
> But which apps on the system can handle type3 fonts?

That's not the point, libmagic should identify files accurately and then apps can decide it they want to process them or not. Pretending a Type3 font is an EPS file does not help.

Comment 7 James Cloos 2009-06-17 15:49:46 UTC
> Pretending a Type3 font is an EPS file does not help

But that is not what it is doing.  The file really *is* an encapsulated postscript file.  That the eps contains a ps type3 font is secondary to what it is.

Also, there is no such thing as magic for a ps type3.  It is just postscript code.  It is really no different that a pattern dictionary.

I presume the bug report was essentially automated based on the file’s .pfa filename extension, but it is really an eps file with a funny name.

Of course, I can only debate.

Comment 8 James Cloos 2009-06-17 15:51:19 UTC
> Of course, I can only debate.

And hit the wrong button, it seems.  ☹

That was supposed to say »only opine and debate«.

Comment 9 Nicolas Mailhot 2009-06-17 18:21:55 UTC
This bug was not automated but is based on steps that are being automated right now.

If ps3 is really different and not identifiable via magic I suppose this particular bug is really enscript using the pfa extension for eps code.

Comment 10 Adam Tkac 2009-11-30 12:05:42 UTC
(In reply to comment #9)
> If ps3 is really different and not identifiable via magic I suppose this
> particular bug is really enscript using the pfa extension for eps code.  

I don't like approach like "File has XYZ extension thus it contains ABC content" but I will fix this issue to make your scripts happy.

Comment 11 Adam Tkac 2009-11-30 12:06:42 UTC
*** Bug 477382 has been marked as a duplicate of this bug. ***

Comment 12 Nicolas Mailhot 2009-11-30 12:29:33 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > If ps3 is really different and not identifiable via magic I suppose this
> > particular bug is really enscript using the pfa extension for eps code.  
> 
> I don't like approach like "File has XYZ extension thus it contains ABC
> content" but I will fix this issue to make your scripts happy.

It is a matter of consistency with other packages. If many of them used pfa for eps code, I wouldn't bother you with it, but a2ps is pretty much one-of-a-kind here, so it's worth transforming "almost every pfa file in Fedora is a font" to "every pfa file in Fedora is a font" (makes scripts & rpm so much simpler)

Comment 13 Adam Tkac 2009-11-30 14:19:09 UTC
Fixed in enscript-1.6.4-15.fc13.


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