Back to API Reference
Class
BoldModifier
Inherits:BaseModifier
Applies bold styling to text using CSS font-weight scale (100-900).
Remarks
First parameter: CSS font-weight 100-900 (default: max(700, baseWeight+300)). Second parameter — mode: f (<b=700,f>) forces synthetic bold (SDF dilate + advance correction); r (<b=700,r>) uses a real bold face only, staying at the natural weight when none matches. Default (no mode) prefers a real face — Font Family static cut or variable wght axis — and synthesizes only as a fallback. One buffer carries both: the top 2 bits select the mode, the low 6 bits the weight.
