Add Adobe Font Metrics to recognised filetypes #3731
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adobe Font Metrics (
*.afm
files) are a data format for storing character measurements, encoding data, and other PostScript/Type 1-specific metadata. Wikipedia's page on PostScript fonts touches on it briefly:Fundamentally, all three formats are the same for our purposes: they share the same file-extension and perceivable syntax, so I haven't bothered adding
*.acfm
and*.amfm
files as associated extensions. Not that there even are, anyway. I have included them as language aliases, however.In-the-wild usage
Scrape and logs stashed in the silo, as per usual:
Alhadis/Linguist-Silo/tree/afm
. Nearly 269,000 results in-the-wild, most of them duplicates. Which doesn't surprise me, considering a good deal of those results point to GhostScript forks/mirrors. GhostScript (the most popular free implementation of Adobe PostScript) distributes free versions of the base 35 PDF fonts in several formats, which includes AFM files.Origin of samples
Both of the samples I added were converted from TTF files sourced from
google/fonts
, both released under Apache-friendly licenses:SpecialElite.afm
-> https://github.com/google/fonts/tree/8839397/apache/specialeliteOpenSansCondensed-Bold.afm
-> https://github.com/google/fonts/tree/44438ae/apache/opensanscondensedTo be honest, I really don't think it matters, though. AFM files don't contain any glyph information: just the width and heights, spacing adjustments, et al. I erred on the side of caution anyway. GhostScript's fonts are released under the GNU Affero License, so... suffice to say that was a no-go.