This function sets the hinting mode in the Typesetter. The hinting mode tells the Typesetter how to micro-adjust glyph outlines in hinted or auto-hinted fonts with respect to the pixel grid before the glyphs are actually rasterized by the Rasterizer. The purpose of these micro-adjustments is to improve the quality and appearance of glyph images when viewed on the screen (or any other raster device). The adjustments usually include subtle outline distortions of glyph outlines such as snapping to the pixel grid, alignment, micro-compression, micro-expansion etc.
When D-Type Engine is initialized, the hinting mode is already set in the Typesetter to the recommended default value (DV_HINTING_ENGINE_DEFAULT_A).
This function can be used in conjunction with TypesetterSetPositioning. For further details and illustrations, see Appendix — Positioning And Hinting.
Please note that all the hinting adjustments described here will only have effect on fonts that are added to the Font Catalog as hinted or auto-hinted (see e.g. FontAddViaStream for details).
Parameter | Description |
---|---|
hinting |
Sets one of the hinting modes. The hinting mode tells the Typesetter how to interact with the pixel grid when rendering glyphs. At present, the following values are supported: hinting = 0 (DV_HINTING_ENGINE_DEFAULT_A) — Engine Default A (same as 8) hinting = 1 (DV_HINTING_ENGINE_DEFAULT_B) — Engine Default B (same as 9) hinting = 2 (DV_HINTING_USER_DEFAULT_A) — User Default A (same as 4) hinting = 3 (DV_HINTING_USER_DEFAULT_B) — User Default B (same as 6) hinting = 4 (DV_HINTING_XON_YON) — X On, Y On hinting = 5 (DV_HINTING_XON_YOFF) — X On, Y Off hinting = 6 (DV_HINTING_XOFF_YON) — X Off, Y On hinting = 7 (DV_HINTING_XOFF_YOFF) — X Off, Y Off hinting = 8 (DV_HINTING_AUTO_A) — Auto A hinting = 9 (DV_HINTING_AUTO_B) — Auto B |
flag |
Specifies action with respect to the Typesetter's bitmap cache. Currently supported values are:
|
If successful, the return value is 1. Otherwise, the function returns 0.