I think I am making some progress on using FreeType to work with fonts (
previous blog post). And no, I am not planning to include my new
Not Alteran font (
blog post).
The plan is to move some things I previous did using postscript to SVG, mainly because of its much improved unicode handling. By being able to determine metrics when creating the SVG I can create an SVG that does line breaks and stretching or whatever correctly for the font.
One of the targets for this work is my existing
card design platform. It needs some improvement I know, and I have done quite a few things recently, but moving to SVG would make it much neater - not only to see the designs on screen, but also to make cards using unicode characters properly.
And no, not just for emojis (though they will be included in the logic), but for all of the accented characters. Even just doing cards for a school reunion ran in to issues with the default Postscript font, and I still cannot manage some Polish names! Unicode would solve that properly.
Thankfully there are quite a lot of free web fonts (google do loads), so the system can use those. But there is one font that is annoying me. The Farrington 7B font.
It is defined in ISO 7811-1 which is one of the specifications related to bank cards, and is the font for the main large digits on the card (e.g. credit card number). The ISO standard has an appendix with detail drawings of the character outlines with measurements. They are simple as they are lines and arcs only. I had a copy of ISO 7811-1 ages ago for work, but don't have one now. I could pay for one I guess. Somehow they do manage to kill off dodgy copies just on the Internet (having paid once for a copy I can no longer find, I feel somewhat justified in using a dodgy copy if I could find one).
Also, there are several sites selling the 7B font. And it got me wondering, I may as well make one (assuming I find / buy a copy of the ISO). But then I don't actually have a clue what he copyright issues are here!
Fonts are special from a copyright point of view in that the font itself has copyright, but instances of use of the font are allowed. i.e. the font is like the written recipe and the printed work using it is the cake.
But an ISO is meant to be a set of instructions you can follow. You can make the bank cards following the instructions in the ISO you paid for, and presumably follow them to make an embossing machine to emboss the Farrington 7B characters, and do so without copyright issues.
So can one make a font from the details in the ISO and not be breaking copyright by effectively copying that appendix of the ISO in to a font? I have no idea.
The other issue is the font design tools - I need to work out if I can enter co-ordinates. It seems that they are designed to allow one to draw and drag points, and set guide lines, and so on, not simply enter co-ordinates off an engineering drawing.
The other annoying thing is that I have the spec converted to a Postscript font which I use now. I must have done this at least two decades ago.. From this I should be able to re-work the drawings, but to be honest, that is probably more work than the cost of paying for the ISO again.
Anyway, if I do make a font, I'll
publish it for free. It is 10 digits, and that is it.
%% Farrington 7 B characters (credit cards)
/7B 50 dict dup begin
/FontMatrix [1 233.7 div 0 0 1 233.7 div 0 0] def
/FontType 3 def
/FontBBox [20 0 120 170] def
/FontName (Farrington 7 B) def
/PaintType 3 def
/Encoding 256 array def
/CharStrings 11 dict def
0 1 255 { Encoding exch /null put}for
/Private 10 dict dup begin
/m/moveto load def
/l/lineto load def
/x{currentpoint exch pop lineto} bind def
/y{currentpoint pop exch lineto} bind def
/cp/closepath load def
/an /arcn load def
/a /arc load def
CharStrings /null {} put
/c {Encoding 1 index dup (0)0 get add exch ( ) cvs cvn put
( ) cvs cvn CharStrings exch 3 -1 roll put} bind def
{-15 80 m 15 50 30 90 0 an 15 -50 30 0 -90 an -15 -50 30 -90 -180 an -15 50 30 180 90 an
15 70 m -15 50 20 90 180 a -15 -50 20 -180 -90 a 15 -50 20 -90 0 a 15 50 20 0 90 a}0 c
{-5 80 m 5 x -70 y 45 x -80 y -45 x -70 y -5 x 60 y -15 x 70 y}1 c
{-45 74 m -15 0 80 110 90 an 15 50 30 90 0 an 15 25 30 0 -90 an
-15 -25 20 90 180 a -70 y 45 x -80 y -45 x -15 -25 30 180 90 an
15 25 20 -90 0 a 15 50 20 0 90 a -15 0 70 90 110 a -41 65 l}2 c
{-45 74 m -15 0 80 110 90 an 15 50 30 90 0 an 15 25 30 0 -60 an 15 -25 30 60 0 an
15 -50 30 0 -90 an -15 0 80 -90 -110 an -45 -74 l -41 -65 l -15 0 70 -110 -90 a
15 -50 20 -90 0 a 15 -25 20 0 90 a -25 x 5 y 15 25 20 -90 0 a 15 50 20 0 90 a
-15 0 70 90 110 a -41 65 l}3 c
{-45 80 m -35 x 5 y 10 x 80 y 20 x 5 y 45 x -5 y 20 x -80 y 10 x -5 y -45 x}4 c
{-45 80 m 45 x 70 y -35 x 5 y 15 -25 30 90 0 an 15 -50 30 0 -90 an
-15 0 80 -90 -110 an -45 -74 l -41 -65 l -15 0 70 -110 -90 a 15 -50 20 -90 0 a
15 -25 20 0 90 a -45 x}5 c
{-45 80 m -35 x 0 y -15 -25 30 110 90 an 15 -25 30 90 0 an 15 -50 30 0 -90 an
-15 -50 30 -90 -180 an -45 80 l 15 -5 m -15 -25 20 90 180 a -15 -50 20 -180 -90 a
15 -50 20 -90 0 a 15 -25 20 0 90 a}6 c
{-45 80 m 45 x -80 y 35 x 70 y -45 x}7 c
{-20 80 m 20 55 25 90 0 an 20 35 25 0 -30 an 10 0 l 20 -35 25 60 0 an 20 -55 25 0 -90 an
-20 -55 25 -90 -180 an -20 -35 25 180 120 an -10 0 l -20 35 25 -120 -180 an
-20 55 25 180 90 an 20 70 m -20 55 15 90 180 a -20 35 15 -180 -120 a 0 6 l
20 35 15 -60 0 a 20 55 15 0 90 a -20 -70 m 20 -55 15 -90 0 a 20 -35 15 0 60 a
0 -6 l -20 -35 15 120 180 a -20 -55 15 -180 -90 a}8 c
{45 -80 m 15 50 30 0 90 a -15 50 30 90 180 a -15 25 30 -180 -90 a 15 25 30 -90 -70 a
35 0 l -80 y cp -15 70 m 15 50 20 90 0 an 15 25 20 0 -90 an -15 25 20 -90 -180 an
-15 50 20 180 90 an}9 c
end def
/BuildChar
{
exch begin Private begin
140 0 FontBBox aload pop setcachedevice 70 85 translate
1 setlinecap 1 setlinejoin 10 setlinewidth
newpath Encoding exch get CharStrings exch get exec closepath
gsave
%strokepath
%0 setlinewidth
stroke
grestore
fill
end end
} bind def
end definefont pop
Update: First attempt at font
here.
P.S. I was slightly cursing ISO 7811-1 as (apart from a couple of obvious typos) the dimensions were nasty and did not even add up exactly. E.g. character width 2.54mm but adding the stroke width to the control points gave 2.55mm. I am, of course, being thick, convert the dimensions to tho (1/1000th of an inch) and they come out as nice round numbers. Even the small rounding radius (0.13mm) comes out as 5/1000", and pretty much everything comes out as a multiple of 5/1000". I probably should have converted to tho first as it would have made it a lot easier to work out the co-ordinates. I may re-do some time.
P.P.S. I did redraw, converting to 1/5000th of an inch, which made some nice round numbers.