From 37902520e31f034d00fb141b26aa3fe9e1b9e4ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 21 Apr 2025 13:37:04 +0200 Subject: [PATCH] Text: doc++ Forgot to actually proofread the thing, apparently, not putting mentions of the new class where they should be. --- src/Magnum/Text/DistanceFieldGlyphCacheGL.h | 7 ++++--- src/Magnum/Text/Renderer.h | 14 ++++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/Magnum/Text/DistanceFieldGlyphCacheGL.h b/src/Magnum/Text/DistanceFieldGlyphCacheGL.h index 32e0c33b0..a99111739 100644 --- a/src/Magnum/Text/DistanceFieldGlyphCacheGL.h +++ b/src/Magnum/Text/DistanceFieldGlyphCacheGL.h @@ -45,8 +45,10 @@ namespace Magnum { namespace Text { Extends @ref GlyphCacheGL by processing rendered glyphs to a signed distance field texture using @ref TextureTools::DistanceFieldGL, allowing them to be drawn at different sizes and with various transformations without aliasing -artifacts. It's possible to only use this cache for monochrome glyphs as the -internal texture format is single-channel. +artifacts. @ref DistanceFieldGlyphCacheArrayGL is then using a +@ref GL::Texture2DArray instead of a @ref GL::Texture2D. It's possible to only +use this cache for monochrome glyphs as the internal texture format is +single-channel. @section Text-DistanceFieldGlyphCacheGL-usage Usage @@ -232,7 +234,6 @@ class MAGNUM_TEXT_EXPORT DistanceFieldGlyphCacheArrayGL: public GlyphCacheArrayG /** * @brief Construct without creating the internal state and the OpenGL texture object - * @m_since_latest * * The constructed instance is equivalent to moved-from state, i.e. no * APIs can be safely called on the object. Useful in cases where you diff --git a/src/Magnum/Text/Renderer.h b/src/Magnum/Text/Renderer.h index 88ec85934..c70c62c95 100644 --- a/src/Magnum/Text/Renderer.h +++ b/src/Magnum/Text/Renderer.h @@ -780,8 +780,9 @@ glyph quads don't cut into each other. Assuming the drawing is performed in a below sets up the drawing that the font pixel size matches the window pixels by specifying @ref Platform::Sdl2Application::windowSize() "Platform::*Application::windowSize()" as the projection size, and it appears in the center of the window. With -@ref GlyphCacheArrayGL or @ref DistanceFieldGlyphCacheGL the drawing setup is -slightly different, see their documentation for examples. +@ref GlyphCacheArrayGL, @ref DistanceFieldGlyphCacheGL or +@ref DistanceFieldGlyphCacheArrayGL the drawing setup is slightly different, +see their documentation for examples. @snippet Text-gl.cpp Renderer-usage-draw @@ -934,10 +935,11 @@ The second approach, with text size being relative to the window size, is for cases where the text is meant to match surrounding art, such as in a game menu. In this case the projection size is usually something arbitrary that doesn't match window pixels, and the text point size then has to be relative to that. -For this use case a @ref DistanceFieldGlyphCacheGL is the better match, as it -can provide text at different sizes without the scaling causing blurriness or -aliased edges. See its documentation for details about picking the right font -size and other parameters for best results. +For this use case a @ref DistanceFieldGlyphCacheGL / +@ref DistanceFieldGlyphCacheArrayGL is the better match, as it can provide text +at different sizes without the scaling causing blurriness or aliased edges. See +its documentation for details about picking the right font size and other +parameters for best results. @subsection Text-Renderer-usage-font-size-dpi DPI awareness