Magnum::Text namespace

Text rendering.

Contents

Font texture creation and text layout.

This library is built if WITH_TEXT is enabled when building Magnum. To use this library with CMake, you need to request the Text component of the Magnum package and link to the Magnum::Text target:

find_package(Magnum REQUIRED Text)

# ...
target_link_libraries(your-app Magnum::Text)

Additional plugins and utilities are built separately. See particular *Font and *FontConverter class documentation, the magnum-fontconverter utility documentation, Downloading and building, Downloading and building plugins, Usage with CMake, Plugin usage with CMake and Loading and using plugins for more information.

Classes

class AbstractFont
Base for font plugins.
class AbstractFontConverter
Base for font converter plugins.
class AbstractGlyphCache new in 2019.10
Base for glyph caches.
class AbstractLayouter
Base for text layouters.
class AbstractRenderer
Base for text renderers.
class DistanceFieldGlyphCache
Glyph cache with distance field rendering.
class FreeTypeFont
FreeType font plugin.
class GlyphCache
Glyph cache.
class HarfBuzzFont
HarfBuzz font plugin.
class MagnumFont
Simple bitmap font plugin.
class MagnumFontConverter
MagnumFont converter plugin.
template<UnsignedInt dimensions>
class Renderer
Text renderer.
class StbTrueTypeFont
TrueType font plugin using stb_truetype.

Enums

enum class GlyphCacheFeature: UnsignedByte { ImageDownload = 1 << 0 } new in 2019.10
Features supported by a particular glyph cache implementation.
enum class Alignment: UnsignedByte { LineLeft = Implementation::AlignmentLine|Implementation::AlignmentLeft, LineCenter = Implementation::AlignmentLine|Implementation::AlignmentCenter, LineRight = Implementation::AlignmentLine|Implementation::AlignmentRight, MiddleLeft = Implementation::AlignmentMiddle|Implementation::AlignmentLeft, MiddleCenter = Implementation::AlignmentMiddle|Implementation::AlignmentCenter, MiddleRight = Implementation::AlignmentMiddle|Implementation::AlignmentRight, TopLeft = Implementation::AlignmentTop|Implementation::AlignmentLeft, TopCenter = Implementation::AlignmentTop|Implementation::AlignmentCenter, TopRight = Implementation::AlignmentTop|Implementation::AlignmentRight, LineCenterIntegral = Implementation::AlignmentLine|Implementation::AlignmentCenter|Implementation::AlignmentIntegral, MiddleLeftIntegral = Implementation::AlignmentMiddle|Implementation::AlignmentLeft|Implementation::AlignmentIntegral, MiddleCenterIntegral = Implementation::AlignmentMiddle|Implementation::AlignmentCenter|Implementation::AlignmentIntegral, MiddleRightIntegral = Implementation::AlignmentMiddle|Implementation::AlignmentRight|Implementation::AlignmentIntegral }
Text rendering alignment.

Typedefs

using GlyphCacheFeatures = Containers::EnumSet<GlyphCacheFeature> new in 2019.10
Set of features supported by a glyph cache.
using Renderer2D = Renderer<2>
Two-dimensional text renderer.
using Renderer3D = Renderer<3>
Three-dimensional text renderer.

Functions

auto operator<<(Debug& debug, AbstractFont::Feature value) -> Debug&
Debug output operator.
auto operator<<(Debug& debug, AbstractFont::Features value) -> Debug&
Debug output operator.

Enum documentation

enum class Magnum::Text::GlyphCacheFeature: UnsignedByte new in 2019.10

Features supported by a particular glyph cache implementation.

Enumerators
ImageDownload

Ability to download glyph cache data using AbstractGlyphCache::image(). May not be supported by glyph caches on embedded platforms that don't have an ability to get texture data back from a GPU.

enum class Magnum::Text::Alignment: UnsignedByte

Text rendering alignment.

Enumerators
LineLeft

Text start and line is at origin

LineCenter

Text center and line is at origin

LineRight

Text end and line is at origin

MiddleLeft

Text start and vertical middle is at origin

MiddleCenter

Text center and vertical middle is at origin

MiddleRight

Text end and vertical middle is at origin

TopLeft

Text start and top is at origin

TopCenter

Text center and top is at origin

TopRight

Text end and top is at origin

LineCenterIntegral

Text center and line is at origin and alignment offset is integral

MiddleLeftIntegral

Text start and vertical middle is at origin and alignment offset is integral

MiddleCenterIntegral

Text center and vertical middle is at origin and alignment offset is integral

MiddleRightIntegral

Text end and vertical middle is at origin and alignment offset is integral

Typedef documentation

typedef Containers::EnumSet<GlyphCacheFeature> Magnum::Text::GlyphCacheFeatures new in 2019.10

Set of features supported by a glyph cache.

typedef Renderer<2> Magnum::Text::Renderer2D

Two-dimensional text renderer.

typedef Renderer<3> Magnum::Text::Renderer3D

Three-dimensional text renderer.

Function documentation

Debug& Magnum::Text::operator<<(Debug& debug, AbstractFont::Feature value)

Debug output operator.

Debug& Magnum::Text::operator<<(Debug& debug, AbstractFont::Features value)

Debug output operator.