Debian Codegraph @

doc/sphinx/techref/SuggestDeltas.rst

raw
1 Delta Instruction Suggestions
2 =============================
3
4 After you have generated truetype instructions to grid fit a glyph it might to
5 useful to look at places where those instructions yield questionable results. In
6 truetype a pixel is turned on if the center point of that pixel is within the
7 curve. If the curve is extremely close to the center point then results are
8 questionable
9
10 #. You might want it on the other side
11 #. Another rasterizer might round things differently and place the curve on the
12 wrong side.
13
14 .. image:: /images/QGDlg.png
15 :align: right
16
17 So it might be helpful to have a command which would search the glyph for places
18 and pixelsizes where splines are close to the center points of pixels.
19
20 TrueType has an instruction called DELTA which allows you to move points only at
21 certain pixelsizes.
22
23 The dialog opposite will check the glyph at pointsizes 7-40, 72, 80, ... where
24 the screen resolution is 100 for places where a spline comes within .01 (in
25 pixel units) of the center of a pixel.
26
27 .. image:: /images/QGList.png
28
29 The results will look like those at right. Clicking on an entry will toggle
30 whether that entry is open (and its children visible) or not.
31
32 .. image:: /images/JustOutside.png
33 :align: right
34
35 If you click on one of the bottom level entries then fontforge will open a glyph
36 view on that glyph, rasterize it at the current pointsize and resolution, and
37 indicate the offending pixel by drawing a red box around it. As you can see, the
38 pixel center point lies almost exactly on the spline. The closest real point is
39 the control point #8.
40
41 It is possible to reorder the list... depending on what is most important. At
42 right data are organized by glyph, size and point. It might also be useful to
43 see which points in a glyph are close to problems.