OEReduceFontSizeToFitΒΆ

unsigned int OEReduceFontSizeToFit(const std::string &text, const OEFont &font,
                                   unsigned int minfontsize, double maxwidth)

The OEReduceFontSizeToFit function gradually reduces the font size until the specified string can be drawn without exceeding the width limit.

text

The string for which the font size is calculated.

font

The OEFont object that defines the style of the depiction.

minfontsize

The minimum font size that can be returned.

maxwidth

The width that can not be exceeded when drawing the string.

See also