File: generate.html

package info (click to toggle)
fontforge-doc 0.0.20100429-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 7,240 kB
  • ctags: 1,482
  • sloc: makefile: 2
file content (450 lines) | stat: -rw-r--r-- 21,224 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
<HTML>
<HEAD>
  <!-- Created with AOLpress/2.0 -->
  <!-- AP: Created on: 7-Sep-2002 -->
  <!-- AP: Last modified: 5-Sep-2009 -->
  <TITLE>Generate Font Dialog</TITLE>
  <LINK REL="icon" href="ffanvil16.png">
  <LINK REL="stylesheet" TYPE="text/css" HREF="FontForge.css">
</HEAD>
<BODY>
<DIV id="in">
  <H1 ALIGN=Center>
    Generate Font Dialog
  </H1>
  <P>
  <IMG SRC="generate.png" ALIGN="Right" WIDTH="398" HEIGHT="525">This generates
  font files, both outline and bitmap. You may choose not to generate either,
  you may generate an afm file or a pfm file, you may select the type of postscript
  output, you may select which pixelsizes of bitmap to generate.
  <P>
  The outline types are:
  <UL>
    <LI>
      PostScript Type1 font, binary format (a .pfb file, this may be used by most
      modern windowing systems)
    <LI>
      PostScript Type1 font, ascii format (a .pfa file, this is used by printers)
    <LI>
      PostScript Type1 font, macbinary format (a postscript font wrapped up in
      a set of mac resources wrapped up in a macbinary file, to be copied to a
      mac, unmacbinaried, and installed there)<BR>
      If you are on a mac then a resource fork will be generated directly, macbinary
      will not be used.
      <P>
      <FONT COLOR="Red"><STRONG><BIG>NOTE:</BIG></STRONG></FONT> The mac will not
      recognize a PostScript font unless you also generate a bitmap font in NFNT
      format and place it in the same directory. If you haven't created any bitmap
      fonts yet, cancel this dlg and use
      <A HREF="elementmenu.html#Bitmaps">Element-&gt;Bitmaps Available</A> to generate
      a bitmap font, and then retry this dlg.
      <P>
      <FONT COLOR="Red"><STRONG><BIG>NOTE:</BIG></STRONG></FONT> Apple implies
      that this format is deprecated and therefore it may not work in future versions.
    <LI>
      Multiple Master(A), generates a multiple master font in ascii format (same
      as .pfa)
    <LI>
      Multiple Master(B), generates a multiple master font in binary format (same
      as .pfb)
    <LI>
      Multiple PostScript Type 1 binary fonts (this is used to convert a large
      font with a two byte encoding into a series of smaller pfb (or pfa) files
      with 256 glyphs in each. You may be prompted for a file to specify the
      conversion. See the ttf2tfm man page for a description of these SUBFONT
      DEFINITION FILES. <A HREF="Big5.txt">Here is an example of what the file
      should look like</A>)
    <LI>
      PostScript Type3 font (a .pt3 font, this is also used by printers and is
      not encrypted)
    <LI>
      PostScript Type0 font, this is only available if you have a font encoded
      with Unicode or one of the CJK encodings. Type0 fonts can have up to 65536
      glyphs in them (as opposed to 256 for Type1s and Type3s).
    <LI>
      PostScript Type42 font (this is really a TrueType font wrapped up in PostScript)
    <LI>
      PostScript Type11 font (this is another format for wrapping a TrueType font
      in PostScript, it is a CID format)
    <LI>
      PostScript CID font, this is only available if your font is a
      <A HREF="cidmenu.html">CID font</A>. This produces a font in the old Type1
      CID format. You probably want to use the OpenType CID format...
    <LI>
      PostScript CFF font, this is the format that lives inside the 'CFF ' table
      of an opentype font. It is a valid font format in its own right.
    <LI>
      True Type.
    <LI>
      True Type Symbol. Same as True Type, except it uses the 1 byte encoding given
      in the font. This is important on windows as symbol and dingbat encodings
      often include characters (in the range 0x80-0x9f) which aren't mapped in
      normal encodings. It is important on the Mac because I do not generate the
      correct encoding tables for any script other than MacRoman, so if you want
      a MacCyrillic font use this mode.
    <LI>
      True Type macbinary format, a truetype font wrapped up in a mac resource,
      wrapped up in a macbinary file. Designed to be used for a mac.<BR>
      If you are on a mac, then a file with a resource fork will be generated directly
      (macbinary will not be used).
    <LI>
      True Type dfont format, a truetype font wrapped up in a mac dfont (data fork
      resource file). Mac OS/X font.
    <LI>
      OpenType (CFF). Officially OpenType includes True Type, but OpenType True
      Type fonts are no different from plain True Type fonts, so they might as
      well just be called True Type. So here when I say OpenType I mean OpenType
      with a CFF PostScript Type 2 font inside it.
    <LI>
      OpenType dfont format, an OpenType font wrapped up in a mac dfont (data fork
      resource file). Mac OS/X font.
    <LI>
      OpenType CID, This is only available if your font is a
      <A HREF="cidmenu.html">CID font</A>. It produces an OpenType CID-keyed font.
    <LI>
      <A HREF="#svg">SVG font</A>
    <LI>
      None
  </UL>
  <P>
  The bitmap types are:
  <UL>
    <LI>
      BDF -- The internal bitmap fonts will be saved in bdf format. You may only
      select sizes for which you have already generated fonts (you may output
      anti-aliased (greymap) fonts as well as bitmaps. A 12pixel high greymap font
      with 8 bits/pixel can be represented as 12@8).
    <LI>
      In TTF/OTF -- Store the bitmap fonts inside the ttf (or otf) file (the exact
      format will depend on the settings of the Apple and OpenType bits in the
      Options dlg).
    <LI>
      Apple bitmap only sfnt (dfont) -- Only available if no outline font is generated.
      <A HREF="bitmaponlysfnt.html#Apple">Apple allows bitmaps to be stored within
      a truetype file (sfnt)</A> even if there is no outline font. So this generates
      a ttf file that just contains bitmaps and wraps it up in a dfont.
    <LI>
      (faked) MS bitmap only sfnt (ttf) -- <A HREF="bitmaponlysfnt.html#MS">Microsoft
      does not support a bitmap only format for an sfnt</A>, but this option attempts
      to fake one as best it can.
    <LI>
      X11 bitmap only sfnt (otb) -- this is the new
      <A HREF="bitmaponlysfnt.html#X11">X11 bitmap format with bitmaps embedded
      in an sfnt wrapper</A> (an opentype or truetype font) but with no outline
      data.
    <LI>
      NFNT (MacBin) -- Converts the bitmap fonts into Macintosh NFNT resources
      and wraps them up in a mac binary file.<BR>
      NFNT (Resource) -- On a mac the NFNT font will be generated in a resource
      fork directly.
      <P>
      <FONT COLOR="Red"><STRONG><BIG>NOTE:</BIG></STRONG></FONT> Mac OS/X appears
      not to support NFNT bitmaps (at least I can't get them to work).
      <FONT COLOR="Red"><STRONG>However</STRONG></FONT>, the mac still needs at
      least one NFNT in order to find an type1 font. Even though the bitmap is
      required, it will not be used. Odd.
    <LI>
      Windows FON -- Windows resource based font format.
    <LI>
      Windows FNT -- Windows format, one bitmap font per file.
    <LI>
      Palm fonts -- support for <A HREF="palmfonts.html">various palm bitmap font
      formats.</A>
    <LI>
      PS Type3 Bitmap -- create a PostScript Type3 font which uses the imagemask
      operator to display each glyph's bitmap.
    <LI>
      None
  </UL>
  <P>
  <IMG SRC="GenerateOptions.png" WIDTH="320" HEIGHT="395" ALIGN="Right">The
  <A NAME="Options">options</A> dialog provides the following check boxes.
  Not all are enabled at all times.
  <UL>
    <LI>
      [] Round -- Round all coordinates to integral values. If this is not checked
      then Type1 fonts will be output with 2 decimal digits of precision, and Type2
      fonts with 16 binary digits (~4 decimal digits) when needed.
    <LI>
      [] Hints -- Include PostScript hints in the output file
    <LI>
      [] Flex Hints -- Include PostScript flex hints in the output file
    <LI>
      [] AFM -- Generate an adobe font metrics file (controls generation of .amfm
      files for multiple master fonts too)<BR>
      Note: Normally only 'liga' and 'rlig' ligatures will be output in the AFM
      file. But you can control that in the lookup dialog off of
      <A HREF="fontinfo.html">Font Info</A>.
    <LI>
      [] Composites in AFM -- the AFM format includes a mechanism for building
      composite glyphs out of components. It is roughly equivalent to the OpenType
      mark-to-base feature. Almost nobody uses these data, and they can increase
      the size of an AFM file enormously, but if you would like them check this
      box (if your font does not include any anchor classes, this will have no
      effect).
    <LI>
      [] PFM -- Generate a windows printer font metrics file
    <LI>
      [] <A NAME="TFM">TFM</A> -- Generate a TeX font metrics file (and a TeX enc
      encoding file) 
	<HR>
    <LI>
      [] Hints -- Include truetype hints in a truetype font.
      <UL>
	<LI>
	  R C van Dalen's <A HREF="http://home.kabelfoon.nl/~slam/fonts/">truetype
	  hinting utilities may be helpful here.</A>
      </UL>
    <LI>
      [] PSNames -- Include the full 'post' (postscript name) table in the font
    <LI>
      [] <A NAME="AppleMode">Apple</A> -- Apple and MS/Adobe disagree on the format
      of a ttf font. This is annoying. Checking this box means the font will be
      generated according to Apple's desires, leaving it unchecked means according
      to MS/Adobe's desires. Currently this controls:
      <UL>
	<LI>
	  The bitmap tables (Apple calls it 'bdat', MS/Adobe 'EBDT'. The data in them
	  are the same)
	<LI>
	  The PostScript name in the 'name' table (Apple says there must be either
	  0 or 1 of them, MS/Adobe say any value other than 1)
	<LI>
	  Apple and MS/Adobe also differ on the way references (components) are scaled.
	  Luckily there is another way to disambiguate this case (and references are
	  rarely scaled anyway).
	<LI>
	  The GDEF, GPOS, GSUB and prop, lcar, kern, opbd, morx, feat tables. Apple
	  does not support GPOS/GSUB tables. MicroSoft still supports kern tables for
	  some fonts but requires GPOS for others.
      </UL>
    <LI>
      [] OpenType -- If this is checked the font will be generated with the tables
      used by OpenType. If both this and [] Apple are checked the font will have
      two sets of tables, Apple will look at one set, and everyone else will look
      at the other.
      (<FONT COLOR="Red"><STRONG><BIG>CAVEAT</BIG></STRONG></FONT>: The above statement
      was true up to 10.4 ("Tiger") after 10.4, Apple can use a few OpenType
      features.).
    <LI>
      [] Old style 'kern' -- If this is checked along with OpenType then both an
      OpenType 'GPOS' and an old style 'kern' table will be generated (assuming
      there are any kern pairs, of course). The OpenType mailing list considers
      this a bad idea (some applications may add the kerning values from both tables
      they say), but it may be helpful for applications which don't support 'GPOS'
      kerning.
    <LI>
      [] Dummy DSIG -- On MS Windows, a font with extension "ttf" will be marked
      with an OpenType icon if it contains a 'DSIG' table. FontForge can't generate
      a useful 'DSIG' table, but it can generate a useless, empty and valid one.
    <LI>
      [] Save Comments -- I have added my own table
      ('<A HREF="non-standard.html#PfEd">PfEd</A>') in the truetype format in which
      I can store whatever data I want. Checking this box saves all the glyph comments
      into the output file.
    <LI>
      [] Save Colors -- Save the glyph colors in the
      '<A HREF="non-standard.html#PfEd">PfEd</A>' table as well.
    <LI>
      [] Lookup Names -- Preserve lookup, lookup subtable and anchor class names
      in the 'PfEd' table.
    <LI>
      [] Save Guides -- Save information about where the font's guidelines are
      into the 'PfEd' table.
    <LI>
      [] Save Layers -- Save the background (and spiro) layers into the 'PfEd'
      table.
    <LI>
      [] TeX -- Save TeX metrics in the '<A HREF="non-standard.html#TeX">TeX</A>
      ' table
    <LI>
      [] Output Glyph Map -- Output a file (with extension .g2n) mapping TrueType
      (OpenType) glyph IDs to glyphnames (and possibly to unicode values)
    <LI>
      [] Output OFM &amp; CFG -- Output metrics files for Omega 
	<HR>
    <LI>
      [] Output Font Log -- if the font contains <A HREF="fontinfo.html#FontLog">font
      log </A>information then write it out into a separate file "FontLog.txt".
  </UL>
  <P>
  TTF (and OpenType) fonts are usually generated in Unicode encoding, there
  will also be a tiny macintosh encoding of MacRoman (and a macintosh copy
  of the unicode encoding) -- the exceptions are: KSC5601 and Wansung fonts
  which will use Wansung, Johab fonts will use johab, JIS208 and SJIS fonts
  will use SJIS, Big5 will use big5 encoding. Fonts with a "Full Unicode" encoding
  will have both a 2 byte unicode encoding table and a 4 byte table. OpenType
  CID keyed fonts will be saved with Unicode encoding.
  <P>
  PostScript fonts are generated in whatever encoding the font is using (except
  if you take a two byte encoding and generate a Type1 font (rather than a
  Type0) then only the first few (256) glyphs will be encoded). Type0 does
  not support a full Unicode (4 byte) encoding.
  <P>
  PS CID (and OpenType CID in the CFF) are saved with no encoding. The encodings
  live in separate cmap files which are available from
  <A HREF="http://www.adobe.com/products/acrobat/acrrasianfontpack.html">adobe</A>
  (and perhaps other font vendors).
  <P>
  If you save a CID font with a format other than PS CID or OpenType CID, then
  only the currently displayed subfont will be saved, with the current meaningless
  glyph ordering (I suppose this is useful if you wish to extract a sub-font
  from a CID font).
  <P>
  SVG fonts don't really have the concept of an encoding other than Unicode.
  <P>
  TTF (and OpenType) fonts will produce vertical metrics tables if the font
  has vertical metrics enabled. PostScript type1 fonts will not produce Metrics2
  dictionaries (If someone actually wants this let me know, it can be done,
  but I get the impression that nobody uses this any more).
  <P>
  On Mac OS/X, when generating a resource font containing a postscript font
  then the filename textfield will not be present (as the filename is determined
  by the fontname). You can still select a directory however.
  <P>
  The bitmap sizes must all be present in the font database. AntiAliased fonts
  can be indicated by following the pixelsize by "@&lt;depth&gt;" (ie. "@8").
  <P>
  If you are generating a bdf font then you will be prompted for a resolution
  later.
  <P>
  See the section on <A HREF="encodingmenu.html#namelist">namelists</A> for
  a discussion of the "Force glyph names to" field.
  <P>
  If you leave [] Validate Before Saving checked then FontForge will attempt
  to validate your font. If it passes then FontForge will save it without bothering
  you further, but if it fails FontForge will give you the option of reviewing
  errors and fixing them. It will pop up a <A HREF="validation.html">validation
  window</A>.
  <P>
  If you check [] Append a FONTLOG entry then a text area will open up in which
  you can create a new FONTLOG entry to be appended to the end of the FONTLOG.
  This will become part of the FONTLOG before it is saved (with [] Output Font
  Log in the [Options] dialog) <BIG>BUT</BIG> you must save the font if you
  wish to retain this entry in the sfd file itself.
  <P>
  If you generate a TrueType or OpenType font with the OpenType mode set (note:
  the term "OpenType" means two things, a truetype wrapper around a postscript
  font, or a set of tables containing typographic information -- here the OpenType
  mode refers to the typographic tables) then FontForge will generate
  <A HREF="gposgsub.html">GPOS, GSUB, and GDEF tables</A>. These contain kerning,
  ligature information, arabic forms data, anchor points, etc.
  <P>
  Apple does not completely support these OpenType layout tables. If you set
  Apple mode <A HREF="gposgsub.html#AAT">'kern', 'opbd', 'morx', 'feat', 'lcar'
  and 'prop' </A>tables may be generated instead. (and a couple of other small
  differences will appear).
  <P>
  If you set both Apple and OpenType then both sets of tables will be generated.
  If you set neither, then only the 'kern' table will be generated, and it
  will only contain pair-wise kerning (no kerning classes, no kerning by state
  machine). This is the kind of kerning available in the original truetype
  spec (from which both Apple and OpenType have diverged, but which both still
  support). 
    <HR>
  <H3>
    Uploads to <A HREF="http://openfontlibrary.org/">Open Font Library</A>
  </H3>
  <P>
  It is possible to upload a font to the Open Font Library, please see
  <A HREF="oflib.html#Uploading">that section </A>for more information. 
    <HR>
  <H2>
    Generate <A NAME="Mac-Family">Mac</A> Family
  </H2>
  <P>
  <IMG SRC="GenerateFamily.png" WIDTH="414" HEIGHT="552" ALIGN="Right">This
  brings up a dialog very similar to the generate fonts dialog above, but with
  a few added fields. Because this dialog is for Mac families, only Mac formats
  are supported.
  <P>
  Right above the [Save] button is a list of all fonts that FontForge thinks
  should be included in this family, along with their bitmap info. If you don't
  want a font to be in the family simply uncheck its checkbox.
  <P>
  The font styles that are allowed in a family are limited by the capabilities
  of the mac 'FOND' resource which only allows one style of a given type and
  does not support the concepts of "Light", "Black" (if there is already a
  "Bold" style), "Oblique" (if there is already an "Italic" style), etc. Generally
  FontForge will be able to figure out a font's style from its fontname, but
  in some cases you may wish to override this by setting the
  <A HREF="fontinfo.html#Mac-Style">mac style </A>directly in fontinfo.
  <P>
  As of Mac OS/X 10.6 Apple appears to be deprecating this format and moving
  toward <A HREF="#GenerateTTC">TTC files (see below</A>).
  <P>
  For information on creating mac font families beyond the capabilities of
  this dialog look at the <A HREF="faq.html#How-family">FAQ</A>.
  <P>
  <BR Clear=All>
    <HR>
  <H2>
    <A NAME="GenerateTTC">Generate TTC</A>
  </H2>
  <P>
  <IMG SRC="GenerateTTC.png" ALIGN="Right" WIDTH="423" HEIGHT="536">A TrueType
  Collection file can contain many fonts. They need not be all in the same
  family (though, of course, they can be).
  <P>
  The dialog lists all open fonts, you may choose any of them to go into the
  ttc file. No especial magic is needed to bind fonts into one family (at least
  I hope not).
  <P>
  Traditionally ttc files have been used to contain variants of large CJK fonts
  (where most of the CJK glyphs remain the same across fonts with a few glyphs
  (often the latin letters) changing). The format allows glyphs to be shared
  across fonts, which can result in considerable space savings in some collections
  -- but this can also take time.
  <P>
  On the mac, however, ttc files are generally used to contain a font family
  where there is very little (often no) overlap of glyphs between fonts.
  <P>
  FontForge can produce two kinds of ttc files, the first (<CODE>[*] Merge
  tables across fonts</CODE>) will try to use a single merged
  'glyf'/'hmtx'/'hhea'/'vmtx'/'vhea' tables for all fonts (and will try to
  share other tables if that is possible). The second, with merge tables turned
  off, will dump individual fonts into the collection with no attempt to optimize.
  <P>
  FontForge can also produce ttc files which use the CFF font format. The OpenType
  documentation claims this will not work, but it does seem to on both the
  Mac and unix/linux.
  <P>
  FontForge is not always able to produce merged tables ... this process will
  fail if:
  <UL>
    <LI>
      The selected fonts have different emsizes
    <LI>
      Bitmaps are to be included in the collection
    <LI>
      More that 65534 glyphs would be needed in the merged table
    <LI>
      If you select the CFF format then the private dictionaries must match.
    <LI>
      (or something else goes wrong)
  </UL>
  <P>
  <BR Clear=All>
    <HR>
  <H2>
    <A NAME="svg">SVG</A> fonts
  </H2>
  <P>
  SVG (Scalable Vector Graphics) fonts, come in two forms, one corresponds
  roughly to a PostScript Type1 font, and one to a PostScript Type 3 font.
  <P>
  In the first format a set of contours is specified for each glyph. There
  is no indication given whether the font should be stroked or filled -- that
  informaton will have inherited from the graphical environment when the font
  is used on text.
  <P>
  In the second format each glyph may contain the stroke and fill commands
  needed to draw it.
  <P>
  FontForge usually generates the first format, but for multi layered or stroked
  fonts it will generate the second format.
  <P ALIGN=Center>
  -- <A HREF="filemenu.html">Prev</A> -- <A HREF="overview.html">TOC</A> --
  <A HREF="filemenu.html">Next</A> --
</DIV>
</BODY></HTML>