Function Context.setFontSize

Sets the current font matrix to a scale by a factor of size, replacing any font matrix previously set with setFontSize() or setFontMatrix(). This results in a font size of size user space units. (More precisely, this matrix will result in the font's em-square being a size by size square in user space.)

If text is drawn without a call to setFontSize(), (nor setFontMatrix() nor setScaledFont()), the default font size is 10.0.

Prototype

void setFontSize(
  double size
);

Parameters

NameDescription
size the new font size, in user space units

Authors

Johannes Pfau cairoD
Andrej Mitrovic cairoD
cairo team cairo

Copyright

License

cairoD wrapper/bindings Boost License 1.0
cairo LGPL 2.1 / MPL 1.1