What is MIME type "application/x-font-pfm"?

A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.

application/x-font-pfm is a MIME type for Adobe PostScript font metrics files. These files store the measurements that programs use to render text accurately. They include details like character widths, kerning pairs, and spacing adjustments.

Key Facts:

Files using this MIME type typically have the extension PFM.

For more technical details, please visit Filext.

Associated file extensions

Usage Examples

HTTP Header

When serving content with this MIME type, set the Content-Type header:


    Content-Type: application/x-font-pfm    
  

HTML

In HTML, you can specify the MIME type in various elements:


    <a href="file.dat" type="application/x-font-pfm">Download file</a>    
  

Server-side (Node.js)

Setting the Content-Type header in Node.js:


    const http = require('http');    
    
    http.createServer((req, res) => {    
      res.setHeader('Content-Type', 'application/x-font-pfm');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

What is the purpose of the application/x-font-pfm MIME type?

This MIME type identifies Printer Font Metrics (PFM) files, which contain layout data like character widths and kerning for Type 1 PostScript fonts. Unlike standard font files, application/x-font-pfm data only holds measurements, not the visual glyphs themselves.

How do I configure Apache or Nginx to serve PFM files?

For Apache, add the line AddType application/x-font-pfm .pfm to your .htaccess file or main configuration. For Nginx, include application/x-font-pfm pfm; inside the types { ... } block within your nginx.conf.

Can I use application/x-font-pfm files for web fonts?

No, modern web browsers do not support PFM files for web typography via the CSS @font-face rule. You should convert these legacy fonts to WOFF or WOFF2 formats and use MIME types like font/woff2 for web compatibility.

Why are PFM files often paired with PFB files?

A PFM file provides the metrics (spacing and layout), while the associated PFB (Printer Font Binary) file contains the actual shapes of the characters. Historically, Windows systems required both the PFM and PFB files to install a Type 1 font correctly.

Is the application/x-font-pfm format still widely used?

It is largely considered a legacy format, having been superseded by OpenType (.otf) and TrueType (.ttf) fonts which combine metrics and glyphs into a single file. You will primarily encounter this MIME type when working with older print archives or legacy Adobe software.

How do I fix a 404 error when downloading a PFM file?

This often happens if the web server does not recognize the .pfm extension. You must manually register the MIME type application/x-font-pfm in your server's MIME map (e.g., IIS Manager or Apache config) to allow the file to be served correctly.

Are there security risks associated with PFM files?

While PFM files are binary data containing metrics, font parsing vulnerabilities have historically existed in operating systems. Always ensure your OS is patched, but generally, application/x-font-pfm files are safer than executable formats since they do not contain code.

General FAQ

What is a MIME type?

A MIME (Multipurpose Internet Mail Extensions) type is a standard that indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.

MIME types are important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.

MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.

How do I find the MIME type for a file?

You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.

Why are multiple MIME types listed for one extension?

Different applications and historical conventions may use alternative MIME identifiers for the same kind of file. Showing them all helps ensure compatibility across systems.