Function

HarfBuzz-0.0HarfBuzzfont_set_synthetic_boldSince 7.0.0

  • 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 hb_font_draw_glyph_or_fail().

    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: font_t

      HarfBuzz.font_t to work upon

    • x_embolden: number

      the amount to embolden horizontally

    • y_embolden: number

      the amount to embolden vertically

    • in_place: number

      whether to embolden glyphs in-place

    Returns void

    7.0.0