Font utilities

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.1.3 Character manipulation options

The following options affect individual characters.

When any of them are specified, the dimensions of the output character are likely to be quite different than those of the input characters; therefore, Fontconvert does not copy the TFM information (when writing a TFM file) from an existing TFM file.

`-baseline-adjust code1:delta1,code2:delta2,...'
Adjust the baseline of the output (i.e., after remapping) character code by the corresponding delta. A negative delta moves the baseline down, a positive one up. Multiple `-baseline-adjust' options combine.

`-filter-passes passes'
`-filter-size half-cell-size'
`-filter-threshold intensity'
Run each character through an "averaging filter" passes times. This tends to smooth rough edges on characters or irregular curves. By the same token, it tends to shrink or eliminate small features, such as features. Experimentation is necessary to determine the best values for any particular font.

For the pixel at coordinate (x,y), Fontconvert looks at its neighbors in rows y - half-cell-size, ..., y-1, y+1, ..., y + half-cell-size, and similarly for the columns.

Fontconvert computes the average intensity of this square; if the result is greater than intensity, it outputs a black pixel at (x,y); a white one, otherwise.

This process is repeated for every pixel in every character, and every character is filtered passes times.

The default is to do no filtering, i.e., passes is zero. The default for half-cell-size is one; the default for intensity is .5.

`-random distance'
`-random-threshold probability'
In every character, randomly move each black pixel. We implemented this as part of our research (to see how much characters could be distorted before they became noticeably harder to read--the answer is a lot), but left it in the program for its amusement value.

For each black pixel, a first random number between zero and one is compared to probability. If it is greater, nothing happens. Otherwise, a second random number is chosen, this one between -distance and distance. The pixel is "moved" that far horizontally. Then repeat for the vertical axis.

The default is to do no randomization, i.e., distance is zero. The default for probability is .2.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]