Function

HarfBuzz-0.0HarfBuzzfont_paint_glyphSince 7.0.0

  • Paints the glyph. This function is similar to hb_font_paint_glyph_or_fail(), but if painting a color glyph failed, it will fall back to painting an outline monochrome glyph.

    The painting instructions are returned by way of calls to the callbacks of the funcs object, with paint_data passed to them.

    If the font has color palettes (see hb_ot_color_has_palettes()), then palette_index selects the palette to use. If the font only has one palette, this will be 0.

    Parameters

    • font: font_t

      HarfBuzz.font_t to work upon

    • glyph: number

      The glyph ID

    • pfuncs: paint_funcs_t

      HarfBuzz.paint_funcs_t to paint with

    • paint_data: any

      User data to pass to paint callbacks

    • palette_index: number

      The index of the font's color palette to use

    • foreground: number

      The foreground color, unpremultipled

    Returns void

    7.0.0