I can't understand the bluescale part of the Type 1 Font Specification. Could you explain it to me with examples in which the overshoot supression is performed or ceased?
The /BlueScale
value is described in the Type 1 Font Format book, by Adobe Systems. See Section 5.6 BlueScale (p. 45), which gives an entire page over to describing the BlueScale value.
Simply put, BlueScale tells the font renderer the font scale at which it should turn off overshoot suppression. Overshoot refers to a feature of a glyph shape which falls into a significant horizontal band in the glyph design. The Type 1 format indicates these bands as alignment zones. Alignment zones might be used for the baseline or the x-height. Overshoot suppression means that the font renderer should render all font features which end up in the alignment zone at the same pixel height.
Overshoot suppression is one of several hints in the Type 1 font format which allows a font renderer to produce good-looking glyphs, when there aren't many device pixels to render a glyph shape, and so it's impossible to maintain fidelity to the nuances of the glyph outline. By ensuring that all features in an alignment zone are rendered at the same pixel height, the renderer can deliver uniformity if not fidelity. Where the glyph is large or device pixels are small, on the other hand, there are plenty of pixels to maintain fidelity to the glyph outline, so overshoot suppression isn't necessary.
The /BlueScale
value is a number giving the size of one character unit (where 1 em is 1000 character units) in terms of device pixels. If the size of a character unit is greater than this value, then overshoot suppression is turned off. If the size of a character unit is less, then overshoot suppression is turned on. The Type Font 1 Format isn't clear what happens if the size of a character unit exactly equals the BlueScale value.
Section 5.6 gives suggestions for setting BlueScale values on 300 dpi devices. The constraints are:
BlueScale = (pointsize - 0.49) / 240
, i.e. set BlueScale to a value which lets one integer point size receive overshoot suppression, and the next largest integer point size turn off overshoot suppression.BlueScale
such that (pointsize - 0.49) * (maximum alignment zone height) < 240
, i.e. BlueScale to a value small enough that overshoot suppression ends before the largest alignment zone in the font becomes one device pixel high.The value 240 is based on the combination of 72 PostScript language point units per inch and 300 device pixels per inch and 1000 character units per em-square. A 1-point em-square has 1000 character units per point, or 72*1000 character units per inch, or 72*1000/300 character units per device pixel, = 240 character units per device pixel.
Section 5.6 gives two example BlueScale values, for font point sizes on a 300 dpi device:
Overshoot suppression is also affected by the /BlueShift
parameter, described in Section 5.7 BlueShift of the Type 1 Font Format. The details are beyond the scope of this answer; you really have to read the Type 1 book itself.
Section 5.6 BlueScale of Type 1 Font Format explains all this somewhat clearly, but not completely rigourously. And it is not a simple topic. It's important to read the whole of the Type 1 Font Format book, plus the coordinate system and font portions of the PostScript Language Reference Manual, plus work through the formulas yourself, if you really want to understand this material.