Skip to content

Commit 39ff0f9

Browse files
committed
Docs: Add a note about ascent override to Font::getHeight()
1 parent 79748d2 commit 39ff0f9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

modules/juce_graphics/fonts/juce_Font.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,14 @@ class JUCE_API Font final
290290
This is the maximum height, from the top of the ascent to the bottom of the
291291
descenders.
292292
293-
@see withHeight, setHeightWithoutChangingWidth, getAscent
293+
There can be a notable exception to this rule however, if you use the
294+
ascent/descent override feature. This feature follows CSS semantics and acts
295+
on the point height of the Font. So if you specified the font's height using
296+
setHeight() and also specified an ascent or descent override, then the visually
297+
rendered height of the Font can be different from the value returned by
298+
getHeight().
299+
300+
@see withHeight, setHeightWithoutChangingWidth, getAscent, setAscentOverride
294301
*/
295302
float getHeight() const noexcept;
296303

0 commit comments

Comments
 (0)