next up previous contents index
Next: Computation of Parallel Paths Up: Stroked Characters Previous: Stroked Characters   Contents   Index

Approach

Type 1 character outline descriptions consist of mathematically thin defining curves and lines with an associated running direction. By convention, regions left of these defining curves are painted and regions right of these curves are left blank. For each properly defined character, this way, a finite area to be filled results by applying this rule, especially because for filled characters every subpath must be closed. Figure [*] \fbox{A} shows the character ``8'' from the ComputerModern Roman font as an example.
Figure: A Character ``8'' from font ComputerModern Roman. The arrows indicate the direction of the paths. From the outer subpath it follows that the inner region will be filled (left of the path). From this massive black region, the holes are cut by means of the two inner subpaths (and their direction). B The principle of creating a stroked character by filling a newly created set of subpaths which surround the original path in an appropriate manor.
\fbox{A}\includegraphics[scale=0.5]{t1dump/t1dump_eight} \fbox{B}\includegraphics[scale=0.5]{t1dump/t1dump_o}

We find three subpaths which by means of their direction relations yield the filled character.

When talking about stroking, we mean tracing a pen of finite width along these subpaths. When doing so, a new finite (more complex) region of ink is built. Actually we can consider this filled region being the result of filling a newly created path that consists of two subpaths surrounding the original path and having appropriate directions. These newly created subpaths are referred as the right path and the left path. Figure [*] \fbox{B} illustrates this idea for the character ``o''. The original path is represented by dashed curves whereas left paths and right paths are shown as solid curves. The respective directions are indicated by arrows.

Now, what are the steps required to compute a right path or left path from a given path and given a certain strokewidth? Firstly, for each path segment two parallel paths the right and the left path, located half the strokewidth right and left of the original path have to be computed. This is shown for the character ``t'' in Figure [*], \fbox{A}.

Figure: A Character ``t'' from font ComputerModern Roman. The original path is shown in a thick dashed style. Each segment is surrounded by a parallel path to the right hand side and a parallel path to the left hand side. B Required additional connection segments in order to complete the outline path.
\fbox{A}\includegraphics[scale=0.5]{t1dump/t1dump_t_1} \fbox{B}\includegraphics[scale=0.5]{t1dump/t1dump_t_2}

In particular, it turns out that in order to connect two parallel right or left paths of two neighboring original path segments, additional path segments are required. Therefore, in a second step, these parallel path segments--which in general may be disjoint--have to be connected appropriately. These additional path segments are shown in \fbox{B} of the figure. We term these path segments Prolongation Segments. They are always built as straight lines. It is also obvious, that for convex edges, prolongation actually is what it indicates, and for concave edges, some trick must be applied so that prolongation yields a path that actually shortens the respective parallel path segments.


next up previous contents index
Next: Computation of Parallel Paths Up: Stroked Characters Previous: Stroked Characters   Contents   Index
2004-10-04