Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Changes the font weight.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 4.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.SetFontWeight"; PDF; Weight )   More


Parameter Description Example
PDF The PDF reference returned from DynaPDF.New. $pdf
Weight The new weight value. 100


Returns OK or error.


Changes the font weight.
The font weight specifies the thickness or boldness of a font. Not all fonts are available in a bold style; such a font style can then be emulated only. The property FontWeight specifies the weight that should be emulated. The visual weight of a font depends on the base weight in that the font was defined. For example, the glyphs of an ultra-light font look also light if an extra-bold weight will be emulated.

However, a bold font will never be emulated if the font is already available in a bold style. To disable the emulation of bold fonts set the property to 100 or 0.

Font weights:
  • 100 - 300 // Ultra-light, Light
  • 400 - 500 // Standard
  • 600 - 1000 // Bold, Extrabold

See also SetFontWeight function in DynaPDF manual.

See also

This function checks for a license.

Created 21st October 2014, last changed 25th February 2021

DynaPDF.SetFontSelMode - DynaPDF.SetGStateFlags