Mime types for fonts

fontforge's picture

Someone asked me what the appropriate MIME type was for a FontForge sfd file.

I can't find any MIME types for any font formats. The IANA registry list does not include any
http://www.iana.org/assignments/media-types/

I see at one point there were discussions about getting a top-level MIME type for fonts
http://www.w3c.org/Printing/chase.html
but I presume that has since foundered as nothing seems to have come of it.

So are there any existing standards I can't find?
If not, would

  1. application/vnd.opentype
  2. application/vnd.truetype
  3. application/vnd.pstype1

seem reasonable MIME types to try and register?

guifa's picture

Are you talking about the SFD (FontForge internal file format) or for the fonts generated (or both?)

Since FontForge's file format is cleartext, the MIME type could any of the following I think

text/x-fontforge
application/x-fontforge
application/vnd.fontforge-sfd
application/vnd.fontforge.sfd

Although I think one of the latter two would be prefered in modern day coding.

«El futuro es una línea tan fina que apenas nos damos cuenta de pintarla nosotros mismos». (La Luz Oscura, por Javier Guerrero)

fontforge's picture

Well the thing which started me looking into this was someone involved with freedesktop asking about fontforge's sfd. That seemed pretty simple, something like application/vnd.fontforge-sfd.

But if there were a convention for font types, then I should follow that. And if there is no convention for font types there should be.

And that is really my question:
No one seems to have registered MIME types for the standard font formats with IANA. I think that should happen, otherwise there will be a proliferation of "x-" types with no consistency. Given that no one has done this, should there be a standard format like

application/vnd.font-truetype
application/vnd.font-opentype
...

or should things be just

application/vnd.truetype

twardoch's picture

George,

I think application/vnd.font-truetype is somewhat superflous. application/vnd.font-opentype obviously applies to both .otf and .ttf, and I can't think of a font that would need to have the MIME type application/vnd.font-truetype without it just being application/vnd.font-opentype.

On the other hand, PostScript Type 1 is by no way a standardized data structure. You have the Mac FFIL and LWFN resource fork structures, you have the .pfb and .pfa data fork structures along with the auxiliary files .pfm, .inf and .afm.

I think it would do good to just forget any attempt to clean the old Type 1 mess up and just proposed one MIME type for the one font format that is currently of interest, that is ISO/IEC 14496-22 (Open Font Format), also known as OpenType.

Adam

fontforge's picture

Thanks Adam, that's a good point.

Apple might disagree, since their TrueType 2.0 extentions are not part of OpenType, but for most purposes an 'sfnt' is an 'sfnt'. Best to avoid proliforation of MIME types.

I still think there is a use to having a MIME type for type1 pf[ab], because there are still a lot around and the distinction between ASCII and Binary doesn't affect most font consumers (and the less common formats are ignorable).

But you are right that an OpenType MIME is the most important.

guifa's picture

If OpenType is vendor inspecific (which AFAIK is correct), then it shouldn't be vnd- rather:

application/x-opentype

Whereas with the truetypes you would have

application/vnd-apple.fubar
application/vnd-microsoft.fubar
application/vnd-adobe.fubar

etc etc

«El futuro es una línea tan fina que apenas nos damos cuenta de pintarla nosotros mismos». (La Luz Oscura, por Javier Guerrero)

twardoch's picture

Guifa,

OpenType is a Microsoft registered trademark but the OpenType format has been standardized as Open Font Format (ISO/IEC 14496-22).

A.

Bert Vanderveen's picture

There's an ongoing discussion on the OpenType List adressing this.

subscribe: opentype-migration-sub@indx.co.uk

. . .
Bert Vanderveen BNO

fontforge's picture

The "x-" namespace is inappropriate for opentype. It is for experimental stuff. And OpenType does not qualify as experimental.

Yes, a better approach would be to get someone from the ISO opentype group to register
application/font-opentype.
And even better approach would be for someone from the ISO group to register a top-level MIME type for fonts and then register
font/opentype
Both of these require someone in an established standards group to spearhead the effort. The IANA will not accept requests from random people for such things.

Which is why I suggested "vnd." -- because it is something which I could do without depending on others.

Syndicate content Syndicate content