Debian Codegraph @

doc/sphinx/ui/dialogs/prefs.rst

raw
1 Preferences Dialog
2 ==================
3
4 Configuration Files
5 -------------------
6
7 FontForge will load its preferences from multiple places, and the last
8 definition of any preference will win. First, system defaults are loaded from
9 your system wide $sharedir/fontforge/prefs. On a typical installation this might
10 be /usr/local/share/fontforge/prefs or
11 /Applications/FontForge.app/Contents/Resources/opt/local/share/fontforge/prefs
12 on a Mac OSX installation.
13
14 After the system wide prefs file is read your personal preferences are loaded
15 from ~/.FontForge/prefs and will always override the system defaults. Any
16 settings you make will be saved back into ~/.FontForge/prefs.
17
18 The format of these prefs files is identical. So if you are distributing
19 FontForge for a group of new users, you might like to configure your FontForge
20 with settings you wish for everybody to start with and replace the default prefs
21 file in the distribution with your own personal preferences.
22
23
24 The Preferences Window...
25 -------------------------
26
27 .. figure:: /images/prefs-generic.png
28
29 .. _prefs.ResourceFile:
30
31 .. object:: ResourceFile
32
33 (For historical reasons) this is the name of the file containing appearance
34 configuration directives. You can create and edit this file manually according
35 to the information in :doc:`this document </ui/misc/xres>` but normally you
36 just use the :doc:`File->Appearance Editor </ui/misc/resedit>` to initialize and change
37 this file.
38
39 .. _prefs.HelpDir:
40
41 .. object:: HelpDir
42
43 FontForge will search this directory for help files when the user presses
44 [F1].
45
46 .. _prefs.OtherSubrsFile:
47
48 .. object:: OtherSubrsFile
49
50 Allows you to redefine the OtherSubrs routines used in type1 fonts. The file
51 format is described at the scripting command :ff:func:`ReadOtherSubrsFile`.
52
53 .. _prefs.FreeTypeInFontView:
54
55 .. object:: FreeTypeInFontView
56
57 Normally FontForge will use the freetype library to generate glyphs for
58 display in the fontview. This is a bit slower, but creates better images than
59 using FontForge's built-in rasterizer. This preference item allows you to
60 control whether to use freetype or FontForge's own rasterizer.
61
62 .. _prefs.FreeTypeAAFillInOutlineView:
63
64 .. object:: FreeTypeAAFillInOutlineView
65
66 In the :doc:`outline glyph view </ui/mainviews/charview>`, FontForge can generate glyph
67 fills using many techniques. If FontForge is using the freetype library for
68 this, you can enable this option to have FontForge generate fills with anti
69 aliased edges. The old default was not to antialias in order to save some
70 RAM.
71
72 .. object:: SplashScreen
73
74 Controls whether a splash screen is displayed on start up.
75
76 .. object:: EnsureCorrectSaveExtension
77
78 When inputting a name in the Save or SaveAs dialogs, FontForge can ensure
79 that the correct filename extension (SFD or SFDIR) is always used. This
80 prevents you from accidentally naming your source file with a binary
81 extension (such as .otf), out of habit. Most of the time, you will want to
82 leave this preference set to "On" because it does not get in the way and will
83 ensure that the correct extension is given to your font files as you work on
84 them. This makes it much harder to accidentally ship a Fontforge SFD file as
85 as binary file or try to use an SFD format file as a binary font file.
86
87 .. figure:: /images/prefs-newfont.png
88
89 .. _prefs.NewCharset:
90
91 .. object:: NewCharset
92
93 The default encoding used to create new fonts. Normally this is ISO 8859-1.
94
95 .. _prefs.NewEmSize:
96
97 .. object:: NewEmSize
98
99 Specifies the default number of em-units in the em-square. For PostScript
100 fonts this should be 1000, for truetype fonts it should be a power of two
101 (often 512, 1024 or 2048 will be used).
102
103 .. _prefs.NewFontsQuadratic:
104
105 .. object:: NewFontsQuadratic
106
107 Splines in fonts may be either in quadratic or cubic format. TrueType fonts
108 use quadratic splines while PostScript (and OpenType) fonts use cubic
109 splines. When FontForge generates a font it will convert from whatever format
110 is used internally to whatever format is required for the font, so there will
111 be no problem if this is set incorrectly, but setting it correctly for your
112 font means you get a clearer idea of what the outlines will look like.
113
114 .. _prefs.LoadedFontsAsNew:
115
116 .. object:: LoadedFontsAsNew
117
118 When FontForge reads in a font it will generally keep the splines in the
119 format they used in the font (that is quadratic for truetype fonts and cubic
120 for postscript). If you set this flag then all loaded fonts will have the
121 same file format as that specified by NewFontsQuadratic above.
122
123 .. figure:: /images/prefs-openfont.png
124
125 .. _prefs.PreferCJKEncoding:
126
127 .. object:: PreferCJKEncoding
128
129 This controls the loading of truetype and opentype fonts. If a font contains
130 both an unicode encoding subtable and a cjk subtable, then this item allows
131 you to pick which one FontForge will choose to decode.
132
133 .. object:: AskUserForCMap
134
135 When loading an sfnt (truetype, opentype font file), ask the user which cmap
136 encoding s/he would like to use.
137
138 .. _prefs.PreserveTables:
139
140 .. object:: PreserveTables
141
142 A string containing a list of 4 letter table tags separated by commas. When
143 loading an SFNT (ttf/otf) file, any table in the font with one of these tags
144 will be preserved without interpretation. (Note: If FontForge thinks it
145 understands the table it will parse it rather than preserving it).
146
147 .. object:: SeekCharacter
148
149 A unicode character (or a hex name for a unicode character, so either "A" or
150 "U+0041"), fontforge will attempt to scroll the display to this character
151 when it opens a font.
152
153 .. object:: CompactOnOpen
154
155 Whether fontforge should make a font compact when it opens one (does not
156 apply to opening an sfd file which already knows whether it should be
157 compact or not).
158
159 .. figure:: /images/prefs-navigation.png
160
161 .. _prefs.GlyphAutoGoto:
162
163 .. object:: GlyphAutoGoto
164
165 In the glyph window this controls how ff behaves when the user types a normal
166 character. If this is On then when a normal character is typed the glyph
167 window will shift to display that character, if Off typed characters will
168 trigger actions associated with that character as a hotkey or be ignored. For
169 example the default action associated with \` as a hotkey is to trigger
170 Preview mode while that key is pressed.
171
172 .. object:: OpenCharsInNewWindow
173
174 Double clicking on a glyph in a :doc:`font view </ui/mainviews/fontview>` can either always
175 create a new :doc:`glyph view </ui/mainviews/charview>`, or reuse an already opened one.
176
177 .. figure:: /images/prefs-editing.png
178
179 .. _prefs.ItalicConstrained:
180
181 .. object:: ItalicConstrained
182
183 Whether constrained motion in the glyph view should allow motion parallel to
184 the italic angle as well as horizontal and vertical.
185
186 .. _prefs.ArrowMoveSize:
187
188 .. object:: ArrowMoveSize
189
190 The number of em-units an arrow key will move a selected point in the glyph
191 view.
192
193 .. _prefs.ArrowAccelFactor:
194
195 .. object:: ArrowAccelFactor
196
197 When holding down the Alt (Meta) key, the arrow keys will move faster. This
198 preference item says how much faster.
199
200 .. _prefs.DrawOpenPathsWithHighlight:
201
202 .. object:: DrawOpenPathsWithHighlight
203
204 When drawing a foreground layer, render the outline of open paths in a
205 specific color to highlight a potential mistake. When drawing a new path, the
206 incremental stages will be shown in a red, and when the path is closed it
207 will revert back to the normal color. By default this open path highlight
208 color is a red, it can be changed using the OpenPathColor resource. To do
209 this see the Outline View 2 section of the X Resource Editor available
210 through the File menu.
211
212 .. _prefs.SnapDistance:
213
214 .. object:: SnapDistance
215
216 The maximum distance at which pointer motion in the glyph view will be
217 snapped to an interesting object (ie. a point, baseline, width line, etc.).
218 This is measured in pixels.
219
220 .. object:: SnapToInt
221
222 When positioning points and control points, the mouse will move to the
223 nearest integral value. This is useful in editing TrueType (or PostScript if
224 you wish to save space in the font file).
225
226 .. _prefs.JoinSnap:
227
228 .. object:: JoinSnap
229
230 The maximum distance between the endpoints of two splines before they will
231 join with the :menuselection:`Edit --> Join` command. This is measured in
232 pixels in the char view and em-units elsewhere.
233
234 .. _prefs.StopAtJoin:
235
236 .. object:: StopAtJoin
237
238 When dragging points in the outline view, if the end point of one open
239 contour is moved onto the end point of another open contour then those two
240 contours will join. If you leave this Off then further motion will continue
241 to move the points, if you set this to On then FontForge will stop noticing
242 mouse movements (it pretends that you released the mouse button). This is
243 useful if you hand jitters a little on the mouse.
244
245 .. _prefs.CopyMetaData:
246
247 .. object:: CopyMetaData
248
249 Controls the behavior of :menuselection:`Edit --> Copy` from the fontview.
250 Normally Copy does not copy a glyph's metadata (name, encoding, etc.) but if
251 this is set then it will.
252
253 .. _prefs.UndoDepth:
254
255 .. object:: UndoDepth
256
257 Controls the maximum number of Undoes that may be retained in a glyph. (In
258 some rare occasions an Undo will be stored even if this depth is 0)
259
260 .. _prefs.UpdateFlex:
261
262 .. object:: UpdateFlex
263
264 Figure out what points will be part of flex hints after every change to a
265 glyph. Points which are at the center of a flex hint will have a green halo
266 drawn around them. The criteria for flex hints are given on pages 72-73 of
267 Adobe's
268 `T1_Spec.pdf <http://partners.adobe.com/asn/developer/PDFS/TN/T1_SPEC.PDF>`__.
269 This setting can be used to show you when those criteria are not met.
270
271 .. object:: AutoKernDialog
272
273 Controls whether FontForge opens an :ref:`auto kern dialog <lookups.Pair>`
274 for each new kerning subtable.
275
276 .. figure:: /images/prefs-sync.png
277
278 .. _prefs.AutoWidthSync:
279
280 .. object:: AutoWidthSync
281
282 Whether you want the widths of accented glyphs to track the width of the base
283 glyph (so if you modify the width of A then the width of À will automagically
284 change, if À is built as a reference to A and a reference to grave)
285
286 .. _prefs.AutoLBearingSync:
287
288 .. object:: AutoLBearingSync
289
290 Whether you want left side bearings of accented glyphs to track the left side
291 bearing of base glyphs (so if you shift A left, then the accent in À will
292 also be shifted left)
293
294 .. figure:: /images/prefs-tt.png
295
296 .. _prefs.ClearInstrsBigChanges:
297
298 .. object:: Clear Instructions on Big Changes
299
300 TrueType instructions refer to points by number. So if you do any editing
301 that adds, removes or otherwise changes the point numbers then the
302 instructions will be applied to a different set of points.
303
304 Sometimes the results are amusing, but almost always they are ugly and wrong.
305
306 This is very different from having out of date PostScript Hints. There the
307 hints are probably just useless (as opposed to being actively bad, as here).
308
309 FontForge will normally delete all instructions to prevent this happening.
310 However, if you are prepared to fix up the instructions after a set of
311 changes you may prefer to have the instructions left. Be careful though!
312
313 .. object:: CopyTTFInstrs
314
315 When copying and pasting in the font view, copy and paste instructions as
316 well as the glyph outlines.
317
318 .. warning::
319
320 If you copy a glyph from one font to another its instructions will
321 probably not work (it will make assumptions about the control table and
322 subroutines which do not hold in the new font).
323
324 .. figure:: /images/prefs-accent.png
325
326 .. _prefs.AccentOffsetPercent:
327
328 .. object:: AccentOffsetPercent
329
330 The amount of space (as a percentage of the em-square) that should be placed
331 between an accent and the glyph below it by the Build Accented Character
332 command.
333
334 .. _prefs.AccentCenterLowest:
335
336 .. object:: AccentCenterLowest
337
338 Whether accents should be positioned over letters based on the center of the
339 accent, or on the center of the bottom of the accent.
340
341 .. _prefs.CharCenterHighest:
342
343 .. object:: CharCenterHighest
344
345 Whether accents should be positioned over letters based on the center of of
346 the letter, or on the center of the top of the letter.
347
348 .. object:: PreferSpacingAccents
349
350 Whether to prefer spacing accents (Unicode 02C0-02FF) or combining accents
351 (0300-036F) when building accented glyphs.
352
353 .. figure:: /images/prefs-apps.png
354
355 .. _prefs.PreferPotrace:
356
357 .. object:: PreferPotrace
358
359 If you system has both potrace and autotrace installed this allows you to
360 specify which you'd prefer FontForge to use for autotracing.
361
362 .. _prefs.AutotraceArgs:
363
364 .. object:: AutotraceArgs
365
366 This allows you to specify any arguments you want passed to the autotrace
367 program. Don't try to pass something that will change the input or output
368 format or set input or output files.
369
370 .. _prefs.AutotraceAsk:
371
372 .. object:: AutotraceAsk
373
374 If this is set then each time autotrace is invoked it will ask you for
375 arguments.
376
377 .. _prefs.MfArgs:
378
379 .. object:: MfArgs
380
381 This is the command passed to the mf (MetaFont) program which controls
382 conversion of .mf files into bitmaps.
383
384 .. _prefs.MfClearBg:
385
386 .. object:: MfClearBg
387
388 Loading a .mf font is a multi step process, first a bitmap font is generated,
389 it is loaded into the background, then autotrace is invoked to trace around
390 the backgrounds. These background bitmaps can take up a lot of space and you
391 may not want them after they have been autotraced. Selecting this entry will
392 remove those bitmaps from the font after they have been used.
393
394 .. _prefs.MfShowErr:
395
396 .. object:: MfShowErr
397
398 The mf program generates a fair amount of verbiage even when it is working
399 correctly. And if it is working correctly you don't want to see those words.
400 So normally FontForge suppresses messages from mf. But if something goes
401 wrong you do want to see mf's output and setting this will allow you to do
402 so.
403
404 .. figure:: /images/prefs-font.png
405
406 .. _prefs.FoundryName:
407
408 .. object:: Foundry Name
409
410 Used in generating bdf files (part of the X Windows font naming convention).
411
412 .. _prefs.TTFFoundry:
413
414 .. object:: TTF Foundry
415
416 Similar to the above except that it is used inside ttf files (the achVendID
417 field of the OS/2 table) and is limited to 4 characters.
418
419 .. _prefs.NewFontNameList:
420
421 .. object:: NewFontNameList
422
423 Specifies the namelist that will be attached to any new font. This list will
424 be used to name any glyphs created in that font. See the section on
425 :ref:`namelists <encodingmenu.namelist>` for more information.
426
427 .. object:: RecognizePUANames
428
429 Originally Adobe used the PUA (public use area of unicode) to contain glyphs
430 for small caps, lower case numerals, etc. They have since changed their minds
431 and no longer recommend this usage. FontForge normally recognizes names like
432 "a.sc" as being mapped to the appropriate slot in Adobe's old view of the
433 PUA. If you don't like this behavior turn this item off and "a.sc" will not
434 have a unicode encoding.
435
436 .. object:: UnicodeGlyphNames
437
438 Glyph names are supposed to be composed of ASCII letters and numbers (and a
439 few other characters). At least they are when they are stored in a font. But
440 when you are building a font and if you are not an English speaker, it might
441 be useful to have a wider range of letters available for glyph names. You
442 should never export these names when you generate a font (Use the Force Glyph
443 Names to field of the generate dialog).
444
445 .. object:: AddCharToNameList
446
447 Some character names are barely understandable or unintuitive. While editing
448 opentype lookups having long lists of such names, confusion is easy. A
449 character itself may be appended to the name to make things easier.
450
451 .. figure:: /images/prefs-generate.png
452
453 .. _prefs.AskBDFResolution:
454
455 .. object:: AskBDFResolution
456
457 Normally FontForge will guess at what screen resolution you intend based on
458 the pixel size of the font (ie. 17 pixel fonts are usually 100dpi (12pt) and
459 12 pixel fonts are usually 75dpi), but sometimes you will have more esoteric
460 desires. Setting this will give you more control, but you have to click
461 through another dlg.
462
463 .. _prefs.AutoHint:
464
465 .. object:: AutoHint
466
467 Whether glyphs should be automagically hinted before a font is generated or
468 rasterized.
469
470 .. figure:: /images/prefs-pshints.png
471
472 .. object:: StandardSlopeError
473
474 The maximum slope difference that still allows two elements to be considered
475 as parallel. Enlarging this value makes autohinter more tolerable to small
476 deviations from straight lines when detecting stem hints.
477
478 .. object:: SerifSlopeError
479
480 Serifs and other small features usually have to be allowed to deviate from
481 parallellness more than stem edges.
482
483 I am testing a few hinting options there are three radio button sets which add
484 the following hints:
485
486 .. _prefs.Hints:
487
488 .. flex-grid::
489
490 * - .. image:: /images/hintboundingbox.png
491
492 HintBoundingBoxes
493
494 Add hints around the bounding boxes of some glyphs. Adobe seems to do this.
495 - .. image:: /images/hintdiagonalinter.png
496
497 HintDiagonalInter
498
499 Add hints at the intersections of diagonal stems
500
501 - .. image:: /images/hintdiagonalends.png
502
503 HintDiagonalEnds
504
505 .. _prefs.DetectDiagonalStems:
506
507 More importantly there is also the DetectDiagonalStems option. Make sure this is
508 turned on if you intend to have FontForge
509 :ref:`generate truetype instructions automatically <hintsmenu.AutoInstr>`.
510
511 .. figure:: /images/prefs-ttinstrs.png
512
513 :ref:`Truetype autoinstructor <hintsmenu.AutoInstr>` bases its output on
514 postscript hints, but it has also its own options:
515
516 .. object:: InstructDiagonalStems
517
518 Generate instructions for diagonal stem hints. For this option to be useful,
519 :ref:`DetectDiagonalStems <prefs.DetectDiagonalStems>` must be enabled first.
520 Enabling this will lessen apparent weight inconsistencies, perceived at some
521 sizes whenever horizontal and vertical stems are controlled, but diagonals
522 are not.
523
524 .. object:: InstructSerifs
525
526 Try to detect serifs and other elements protruding from base stems and
527 generate instructions for them: try to control distances between serifs' tips
528 and their base stems.
529
530 .. object:: InstructBallTerminals
531
532 Generate instructions for ball terminals. They need different handling than
533 other kinds of serifs.
534
535 .. object:: InterpolateStrongPoints
536
537 Instructing stems is sometimes not enough. This option makes FontForge to
538 interpolate some important points (sharp corners, inflections, curve
539 extremes), not affected by other instructions, between stem edges. Both
540 parallel and perpendicular extremes are controlled. Aggressive optimization is
541 employed, to still leave as many points as possible to IUP, but manual review
542 is nevertheless greatly advised.
543
544 .. object:: CounterControl
545
546 Make sure similar or equal counters remain the same in gridfitted outlines.
547 This was inspired by, but works somewhat independently from,
548 :ref:`PS Counter Hints <charinfo.CounterMasks>`. Enabling this option means
549 that proper shapes are more important than proper scaling of advance widths.
550
551 .. figure:: /images/prefs-opentype.png
552
553 .. _prefs.UseNewIndicScripts:
554
555 .. object:: UseNewIndicScripts
556
557 MS has changed the way it handles indic scripts and has created a parallel
558 set of script tags for the new method. Set this flag if you want to create a
559 font using the new Indic system.
560
561 .. _prefs.scripts:
562
563 .. figure:: /images/prefs-script.png
564
565 This section of the dialog allows you to define built in scripts that will show
566 up in the :ref:`script menu <filemenu.ScriptMenu>`. Each entry has two things
567 associated with it, the menu name and a script file. The menu name will be the
568 name of this entry inside the script menu, and the
569 :doc:`script file </scripting/scripting>` will be the filename of the file to be invoked.
570 The "..." button allows you to browse for script files, which I think have
571 extension .pe (but which can have whatever extension you prefer if you don't
572 like my conventions).
573
574 .. _prefs.Mac:
575
576 .. figure:: /images/prefs-macfeat.png
577
578 The Mac Features dialog allows you to define a set of default names (in many
579 languages) for mac features and settings. These names are placed in the 'name'
580 table whenever a feature/setting is used in a generated 'morx' table. (Thus if
581 you have some common ligatures in your font, then the "ligature" feature names,
582 and the "common ligature" setting names will be added to the 'name' table).
583
584 You may also use this dialog to establish which setting(s) should be on by
585 default in a given feature and whether the feature only allows one setting to be
586 on at a time (the settings are mutually exclusive). All of this data may be
587 overridden by the similar dialog in the
588 :ref:`Element->Font Info <fontinfo.Mac-Features>` dialog.
589
590 .. image:: /images/macfeature.png
591 :align: left
592 :alt: Mac Feature dialog
593
594 To edit an existing feature double click on that feature in the list (at right)
595 this will bring up the dialog on the left. Each feature must be assigned a
596 unique number. You should indicate whether it has mutually exclusive features or
597 not. You should provide names for the feature in various languages, and you
598 should provide settings for the feature.
599
600 To add a new name press the [New] button under the name list and you will be
601 prompted for a language and a name.
602
603 To add a new setting press the [New] button under the setting list. The setting
604 dialog contains the numeric value of this setting (Apple has decreed that if the
605 feature is not mutually exclusive, all settings must be even numbers), whether
606 this setting is on by default, and then a list of names for the setting in as
607 many languages as you like.
608
609 .. flex-grid::
610
611 * - .. image:: /images/macFeatureSetting.png
612 - .. image:: /images/MacFeatName.png
613
614 .. _prefs.Mapping:
615
616 .. figure:: /images/prefs-macmap.png
617
618 The Mac Mapping dialog allows you to define a mapping between OTF ``GSUB``
619 feature tags and Apple's
620 `mort/morx <http://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6morx.html>`__
621 Feature/Setting codes.
622
623 `Apple's published list <http://developer.apple.com/fonts/Registry/index.html>`__
624 of features and settings appears out of date (in that some features used by
625 current fonts are not found in it).
626
627 .. image:: /images/MacMapping.png
628 :align: left
629
630 A four letter OTF feature tag may correspond to a mac feature/setting
631 combination. If you wish to create a new mapping you must first insure that the
632 mac feature setting you desire is present in the feature list (above), and then
633 you may add the mappings.
634
635 You must specify a mac feature (which must already be defined), a mac setting
636 code and a 4 character opentype tag.
637
638
639 Other ways of configuring
640 -------------------------
641
642 A number of things that might be controlled from a preference window are
643 controlled by
644
645 * :doc:`X Resources </ui/misc/xres>`
646 * :ref:`Environment Variables <cliargs.Environment>`