| 1 |
The histogram dialog |
| 2 |
==================== |
| 3 |
|
| 4 |
.. figure:: /images/histogram.png |
| 5 |
|
| 6 |
The histogram dialog is used to display three things which are useful for |
| 7 |
setting the some of the global hinting values that live in the PostScript |
| 8 |
:ref:`Private dictionary <fontinfo.Private>`. The dialog can display |
| 9 |
|
| 10 |
* the distribution of horizontal stem widths |
| 11 |
|
| 12 |
which is helpful in setting [StdHW] and [StemSnapH] |
| 13 |
* the distribution of vertical stem widths |
| 14 |
|
| 15 |
which is helpful in setting [StdVW] and [StemSnapV] |
| 16 |
* and the distribution of the minimal and maximal vertical positions of each glyph |
| 17 |
|
| 18 |
which is helpful in setting [BlueValues] and [OtherBlues] |
| 19 |
|
| 20 |
Moving the mouse around the histogram at the top of the dialog will cause a |
| 21 |
tooltip to appear showing how many stems there are with a given width, how that |
| 22 |
compares to the maximum count, and what glyphs have that width. |
| 23 |
|
| 24 |
For both HStem and VStem, if you click on a histogram bar then that width will |
| 25 |
become the new value for Std[H/V]W, and will be the sole value for |
| 26 |
StemSnap[H/V]. Shift-clicking on a bar will add that width to StemSnap[H/V]. |
| 27 |
|
| 28 |
For BlueValues, entries must be made in pairs, and FontForge uses the first |
| 29 |
value to determine where the pair should be placed. If the first value is |
| 30 |
negative it will be added to OtherBlues, otherwise it will be added to |
| 31 |
BlueValues. The missing second value is marked by ``?`` in the dialog until you |
| 32 |
click on a second bar, at which point the pair will be completed. |
| 33 |
|
| 34 |
The "Bar Width" textfield allows you to change the width of the histogram bars. The |
| 35 |
default value is 6 pixels wide. |
| 36 |
|
| 37 |
The "Smoothing Window" textfield computes the moving avarage of the histogram |
| 38 |
data. This is an attempt to give you a feel for the distribution if it has been |
| 39 |
smeared out. If the window size is above 1 then the count displayed for a given |
| 40 |
width is the average of stems with a similar width, laying within that window. |
| 41 |
For example, if the window size is 3 the count also includes the number of |
| 42 |
stems that are one unit wider or less wide than the given value, and larger |
| 43 |
window sizes give wider averaging. Just because a given width is at a local |
| 44 |
maximum does not mean that it is the appropriate value to be entered in the |
| 45 |
StemSnap array, you may find that if you average things out a bit then a near-by |
| 46 |
value would be a slightly better choice. |
| 47 |
|
| 48 |
Pressing [OK] will set the indicated values in the font's private dictionary. |
| 49 |
|
| 50 |
When invoked from the :ref:`font info dialog <fontinfo.Private>` these dialogs |
| 51 |
will display information on all glyphs. When invoked from the |
| 52 |
:menuselection:`Hint --> Histograms` menu of the font view then only information |
| 53 |
on selected glyphs will be shown (if no glyphs are selected, then again |
| 54 |
information will come from all glyphs). Characters containing references will |
| 55 |
not be counted. |
| 56 |
|
| 57 |
FontForge can automatically generate these values for you (this dialog gives you |
| 58 |
the information you need to make your own choices which may be better than what |
| 59 |
FontForge will do on its own -- it uses essentially these data itself). This |
| 60 |
will happen when you generate a postscript font and the font has no BlueValues |
| 61 |
or StemSnap information associated with it, or when you use the |
| 62 |
:ref:`Element->Font Info->Private <fontinfo.Private>` dialog. |