|
| <prev next> |
Re: Making dummy fonts: msg#00000fonts.fontforge.user
On Mon, 2006-07-03 at 18:04 +0100, George Williams wrote: > On Mon, 2006-07-03 at 08:33, Peter B. West wrote: > > I have a requirement to generate dummy fonts from the Adobe Base14 > > metrics files. > I'm not familiar with "Base14" metrics files. Do you mean afm files > associated with the 14 adobe basic fonts? > > I shall assume these files provide you with the following data: > Names of glyphs > bounding boxes of glyphs > advance widths of glyphs > > > > I see that FontForge supports scripting. I'm thinking of an approach > > like the following. > > > > >From some freely available Type1 font, use FontForge interactively to > > strip out the existing glyphs. > This is overkill I think. > > I would: > Generate an encoding file containing all the glyph names in the > metrics file. > Create a dummy font containing a single glyph that is one em in size > and is a rectangle (or whatever shape you want for your dummy > glyphs) > Write a fontforge script which: > Loads your dummy font > Copies the dummy glyph into the clipboard > > Creates a new font > Reencodes it with your encoding file > Foreach glyph > Select it. > Paste (the dummy glyph in) > Use the bounding box info to scale and translate the > pasted glyph to an appropriate size. > Set the advance width > (set the vertical advance if that is important) > end > Generate it in whatever format you wish. > > FF automagically creates a .notdef glyph > FF automagically creates a .null glyph if you are generating a > truetype font > I assume this can all be automated. > George, I'm only getting around to looking at this again now. Please excuse my ignorance, but I'm unsure about the very first step. The AFM files in question are indeed as you describe. They contain, e.g, StartFontMetrics 4.1 ... FontName Times-Roman FullName Times Roman FamilyName Times Weight Roman ItalicAngle 0 IsFixedPitch false CharacterSet ExtendedRoman FontBBox -168 -218 1000 898 UnderlinePosition -100 UnderlineThickness 50 Version 002.000 ... EncodingScheme AdobeStandardEncoding CapHeight 662 XHeight 450 Ascender 683 Descender -217 StdHW 28 StdVW 84 StartCharMetrics 315 This is followed by the character metrics, e.g. C 32 ; WX 250 ; N space ; B 0 0 0 0 ; C 33 ; WX 333 ; N exclam ; B 130 -9 238 676 ; C 34 ; WX 408 ; N quotedbl ; B 77 431 331 676 ; C 35 ; WX 500 ; N numbersign ; B 5 0 496 662 ; C 36 ; WX 500 ; N dollar ; B 44 -87 457 727 ; C 37 ; WX 833 ; N percent ; B 61 -13 772 676 ; C 38 ; WX 778 ; N ampersand ; B 42 -13 750 676 ; The metrics files are based on original Type1 fonts. They contain no more than 256 characters, and they have the Adobe glyph names. The character data is followed by kerning data. EndCharMetrics StartKernData StartKernPairs 2073 KPX A C -40 KPX A Cacute -40 KPX A Ccaron -40 KPX A Ccedilla -40 KPX A G -40 KPX A Gbreve -40 So far, all of this is Adobe Standard encoding, accodring to the header. There is also a Symbol font, and ZapfDingbats. The names in Symbol are recognizable glyph names- Pse Zeta bracketleft - but the ZapfDingbats font uses "aNNN" ranging from a1 to a205, with some gaps. Both specify teh encoding as FontSpecific. I assume that Symbol is the "Symbol" encoding, but what about ZapfDingbats? Do I need an encoding file? Can I specify the use of a standard encoding? Thanks Peter ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Next by Date: | Re: Making dummy fonts: 00000, George Williams |
|---|---|
| Next by Thread: | Re: Making dummy fonts: 00000, George Williams |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |