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
enscript ships with files that use a pfa font extension but are really eps fi...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: enscript (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Adam Tkac
Fedora Extras Quality Assurance
: Reopened
: 477382 (view as bug list)
Depends On:
Blocks: F11-new-font-rules F12Target
  Show dependency treegraph
 
Reported: 2009-06-13 13:54 EDT by Nicolas Mailhot
Modified: 2013-04-30 19:43 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-11-30 09:19:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Nicolas Mailhot 2009-06-13 13:54:35 EDT
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 06:42:39 EDT
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 08:06:23 EDT
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 08:31:52 EDT
(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 08:32:45 EDT
(Though the upper F in Font for PCF is an annoyance)
Comment 5 James Cloos 2009-06-16 11:45:07 EDT
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 06:47:13 EDT
(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 11:49:46 EDT
> 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 11:51:19 EDT
> 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 14:21:55 EDT
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 07:05:42 EST
(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 07:06:42 EST
*** Bug 477382 has been marked as a duplicate of this bug. ***
Comment 12 Nicolas Mailhot 2009-11-30 07:29:33 EST
(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 09:19:09 EST
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.