~ An essay on identifying and getting ahold of fonts ~

         to essays   
Published @ searchlores in February 2003 ~ Updated March 2003

An essay on identifying and getting ahold of fonts
(With a script to extract fonts from pdf files)

by sonof
february 2003, Version 0.01

(Small additions: 1- april 2003)



Fonts Searching

This is a very simplistic essay on identifying and getting ahold of fonts.

Identifying
At my job, I needed to add a new button for a old website. 1997, so, the original files are not around, don't even think whoever did it the first time is still working there. So, after spending hours comparing the font on the old buttons to ones i have, none of them match.

OK, looking for "font identification" you'll find two automated tools (at least:)
http://www.fontexpert.de/feforme.htm
http://www.myfonts.com/WhatTheFont/ <--best
These work best if you convert to the highest contrast you can get, and convert to black and white.
There are human-based methods as well. Identifont works very well, but you are limited to 30 results, and note that in their FAQ, they state that better placement can be purchased by referral-commision. (This matters when more than 30 fonts are result (often.) Since the criteria for selecting fonts is open to the user, more blatant results-fudging is not likely.)
Also, be aware there is a font cloning industry. (for the opposing view, see http://www.typeright.org) It is more likely you will find the "name brand" version before you'll find the clone, though.

Ok, so now I've identified my font (it was Optima Roman :). How to get it?

Retrieving
Well, poking around the fontophiles community, we see: "I think Hotline was/is the most damaging thing to ever happen to the type industry" [cite]

sounds good to me!

Hotline, (which i never heard of before) is a fileswapping/chat thing based originally on Macs (so many designers use macs means lots of fonts will be found)
For unix users, try SynHXD and windows users try AniClient (the best, i think)
Search hotline servers from the web, look at SADwyw and tracker-tracker (you need hotline client to dl)
And search the trackers (hotline server directories) search for 'font', for instance at Maclavista
But, really any big server has lots of fonts. They will almost always be in an archive, so searching for your specific target will not usually pan out. You can, however, find them often Stuffit-archived by foundry. Hotline has partial downloads resuming.

The other primary source to dl fonts is newsgroups: Luc's page (more about fonts than you ever want to know!) says, "the Adobe collection gets posted about once per year in its entirety."
Be sure to read the alt.binaries.fonts FAQ, much more helpful than many groups'. you'll be able to get on the newsgroups very quickly with their advices.

Conversion
The biggest problem is Mac-->PC. Mac files have two forks (data and resource), and when transferring files, the resource fork is just dropped. It is usually not used, but fonts store all the bits in the resource fork.
get fonts in .sit (Stuffit) format, this preserves both the data fork (normal file) and resource fork (usually dropped). (most archives will be in this archive anyway.) Get Stuffit and set the option "Save Macintosh files in MacBinary format" checkbox. Then expand the archive, and output will be in .bin (MacBinary) format.
Get Crossfont shareware, which works very well; it can convert to PC format Type 1 and TTF from MacBinary.

If you need contents of a .bin directly, use frombin from fondu to decode MacBinary files. If compiling on windows, go through the source and any 'fopen' you find, change the open type to binary (i.e. "w"->"wb","r"->"rb")

To determine postscript font version you can open the file and look for /FontType to find the type. (You'll also find lots of metadata like copyright, date, version, etc.)

It should be possible to do many conversions with pfaedit, but I am unsuccessful in this. Other tools you might want are ttfutils and (for win only) sfty107b.zip
(use to copy type from an image, or to design your own fonts (which is great fun and will impress your friends :) "wow, you can _make_ a font?!")

Extraction
Jimbob long ago requested extraction of fonts from pdfs. Here is my script:

#   using pdftosrc from pdftex-djgpp-20010417.zip
#   (other versions always failed on windows)
#   and using pdffonts supplied with a recent miktex distribution
#   based on info from http://www.polbox.com/g/gnnggb/bxgqzna.html
#   output from pdftosrc will appear on STDERR

$ARGV[0]=~/^(.*).pdf$/i;
my $basename=$1;

#get names of fonts embedded in the pdf
open S, "pdffonts $ARGV[0]|";
my @fonts=grep /\d/, <S>; #get the relevant lines
close S;

#try to match format to proper extension -- UNTESTED!!
my %type_ext=(
    'Type 1'=>'pdb',
    'Type 1C'=>'cff',
    'Type 3'=>'pf3',
    'TrueType'=>'ttf',
    'CID Type 0'=>'cidtype0', #dunno
    'CID Type 0C'=>'cff',
    'CID TrueType'=>'ttf'
);

#these are types of possible fonts embedded in PDFs (from pdffonts manpage)
my $types=join '|', keys %type_ext;

foreach(@fonts){
    local $/=undef;
    /^(\S+)\s+($types)\s+(.*)$/o;
    my ($name,$type,$emb, $sub, $uni, $object, $oID)=($1, $2, split(/\s+/, $3));
    
#   apparently, pdffonts or pdftosrc mishandles the object ID?!
#   or something, anyway, this fixed it for me.
#   may need twiddling.
    $object+=2;
    
    if($emb=~/yes/i){ #is the font embedded?
                      #another variable you might care about is $sub, which indicates
                      #if the font is a subset of the complete font. (it usually is.)
        open S, "pdftosrc $ARGV[0] $object $oID|";
        close S;
        rename "$basename.$object", "$basename.$object.$type_ext{$type}";
    }
}
test document: http://www.dkuug.dk/JTC1/SC2/WG2/docs/n1944.pdf

For this script, you need pdftosrc and pdffonts. You can also use pdftosrc to get TeX output from pdfs. (If you don't want to install pdffonts, you can try the solution from whence i derived this script)
Most pdf's will only have subsets of the embedded fonts; there are only included the glyphs actually used in the document. [cite] Adobe Distiller has the "subset when characters used" option set to default 100% since at least 2001. PDF's produced since then are unlikely to contain all glyphs for the embedded fonts. Also, keep in mind that metric info, kerning and hinting are all lost when you do an extract from a PDF. [more]

The situation is the same if trying to extract fonts from an SWF, the glyphs are only a subset and hinting and kerning is not preserved. You can use SoThink's SWF decompiler to get what you can, though.

Self-Challenge

Ok, i'm thinking i'm pretty smart now, let's have a test and see how good these tools work. Find the face of the 'F' in the +Fravia logo.
First, isolate the f:

'F' 
taken from logo

Whatthefont fails, giving results that look nothing like! Trying identifont, using the "logo" option gets nowhere either, not without more letters. Trying to extrapolate what the rest of the font looks like did not work at all, perhaps because of my inexperience, or perhaps because this 'F' is not very representative of the other glyphs in the font: many other letters have much more flourishes.

sanity check: is the letter hand-crafted? (certainly possible) i decided not, since the effects on the letter look to me like they were done with Photoshop "text effects". (playing around with settings in photoshop gets satisfactorily close.) (There is always the possibility that a custom font was created so as to use the text effects, but this seems unlikely, and is not the case in this instance.)

Now, there are two good methods of arriving at the correct answer. The first requires a little knowledge and zen: what is the first thing to pop into my head when looking at this letter style? First, is Little Nemo lettering, and by association, Mucha. (maybe biased from looking at +F site so much :)) and, searching for 'Art Nouveau' fonts will get you there, although you may not recognize it when you see it:

The second method is looking around a bit more on daVinci's site, and finding the "The+Q" graphic. The lettering has a similar 'feel' to it, maybe they are related?

'the+Q' letters

We can easily find that the font is a version of 'Victorian'. Get a sample of Victorian, and look at 'F'. How similar the serifs! And if we take the original 'F' and fix it's proportions a bit:

'F' with altered proportions
'Fravia' Victorian face sample

...it is really close on.
I tried to get confirmation by daVinci, but received no reply. i am satisfied with results, though.


sonof, 2003



Adddition: April 2003


embed (a program by Tom 7)

This is a quick program I made, according to Microsoft's TrueType Specifications, which will change the embedding level of a TrueType font. I made this for myself, since I noticed that a lot of the Fonts I Made had their embedding set in a very restricting manner. Microsoft's font properties editor does not let you lower this setting (though you can make the license more restrictive).
This program will quickly and automatically set the font to 'installable embedding allowed', the least restrictive setting. You can use Microsoft's editor to make it a more restrictive value, or change it in the source code, if you really require a different embedding level.
To run it, simply give it the name of the ttf file on the command line:
embed font.ttf
No error messages signifies success.

embed.exe [ 23k ] - This is the executable, and all you need.
embed.c [ 2k ] - Source code in C, if you want to play around with it or compile for a non-windows platform.
Both the program and source are in the public domain. Enjoy.

NOTE: Changing the embedding value does not give you license to distribute the fonts. You should only change this setting if you are the font creator, or something like that. Use at your own risk.


Petit image

(c) III Millennium: [fravia+], all rights reserved