From 39ff0f91f4a8722feeeeafa2929210383acf5425 Mon Sep 17 00:00:00 2001 From: attila Date: Wed, 15 Oct 2025 11:21:43 +0200 Subject: [PATCH] Docs: Add a note about ascent override to Font::getHeight() --- modules/juce_graphics/fonts/juce_Font.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/juce_graphics/fonts/juce_Font.h b/modules/juce_graphics/fonts/juce_Font.h index 3896e87d67..6adefaa41a 100644 --- a/modules/juce_graphics/fonts/juce_Font.h +++ b/modules/juce_graphics/fonts/juce_Font.h @@ -290,7 +290,14 @@ public: This is the maximum height, from the top of the ascent to the bottom of the descenders. - @see withHeight, setHeightWithoutChangingWidth, getAscent + There can be a notable exception to this rule however, if you use the + ascent/descent override feature. This feature follows CSS semantics and acts + on the point height of the Font. So if you specified the font's height using + setHeight() and also specified an ascent or descent override, then the visually + rendered height of the Font can be different from the value returned by + getHeight(). + + @see withHeight, setHeightWithoutChangingWidth, getAscent, setAscentOverride */ float getHeight() const noexcept;