fontSetSyntheticBold

fnvoid fontSetSyntheticBold(harfbuzz.font.Font font, float xEmbolden, float yEmbolden, harfbuzz.types.Bool inPlace)

Sets the "synthetic boldness" of a font.

Positive values for x_embolden / y_embolden make a font bolder, negative values thinner. Typical values are in the 0.01 to 0.05 range. The default value is zero.

Synthetic boldness is applied by offsetting the contour points of the glyph shape.

Synthetic boldness is applied when rendering a glyph via [harfbuzz.global.fontDrawGlyph].

If in_place is false, then glyph advance-widths are also adjusted, otherwise they are not. The in-place mode is useful for simulating font grading.

Parameters

font#hb_font_t to work upon
xEmboldenthe amount to embolden horizontally
yEmboldenthe amount to embolden vertically
inPlacewhether to embolden glyphs in-place