A callback to paint a color everywhere within the current clip.
When isForeground is true, this color originates from the foreground-color
sentinel in the font's color data. The color parameter still carries a
fully resolved RGBA value (with any paint-tree alpha already applied), so
backends that do not need to distinguish the foreground can simply use
color directly.
Backends that defer foreground resolution (e.g. to honor a CSS currentColor
or a runtime uniform) should substitute their own foreground RGB when
isForeground is true, but must combine the alpha from color with their
foreground alpha, since it encodes additional modulation from the paint tree.
For this mode to work correctly, the caller should pass a fully-opaque
foreground color to Font.paintGlyph, so that the alpha in color
reflects only the paint-tree contribution.
A callback to paint a color everywhere within the current clip.
When
isForegroundis true, this color originates from the foreground-color sentinel in the font's color data. Thecolorparameter still carries a fully resolved RGBA value (with any paint-tree alpha already applied), so backends that do not need to distinguish the foreground can simply usecolordirectly.Backends that defer foreground resolution (e.g. to honor a CSS
currentColoror a runtime uniform) should substitute their own foreground RGB whenisForegroundis true, but must combine the alpha fromcolorwith their foreground alpha, since it encodes additional modulation from the paint tree. For this mode to work correctly, the caller should pass a fully-opaque foreground color to Font.paintGlyph, so that the alpha incolorreflects only the paint-tree contribution.