Skip to main content

Text Engine

Text Alignment

Enumeration type TextAlignment has been replaced by new enum types HorizontalAlignment and VerticalAlignment.

  • HorizontalAlignment: HLeft, HCenter, HRight, HStretch
  • VerticalAlignment: VTop, VCenter, VBottom, VStretch

Integrated FreeType 2.5

The following new options are available for configuration from CMake:

  • FT_CONFIG_OPTION_NO_ASSEMBLER
  • FT_CONFIG_OPTION_SYSTEM_ZLIB
  • FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT
  • FT_CONFIG_OPTION_USE_PNG
  • FT_CONFIG_OPTION_PIC
  • TT_CONFIG_OPTION_SUBPIXEL_HINTING
  • TT_CONFIG_OPTION_UNPATENTED_HINTING All these options are disabled by default.

RgbColor deprecated

The class Candera::TextRendering::RgbColor has been deprecated. Candera::Color shall be used instead.


Text Measure Context

TextRenderer::GetBoundingRectangle is deprecated. Instead TextMeasureContext is available to provide similar functionality, in a more configurable manner. GlyphTextMeasureContext is a class provided to emulate the behavior of GetBoundingRectangle for ActualHeight alignment parameter. The rectangle returned by this class may be offset from the text position. To have the same alignment as before when rendering the text, the inverse of this offset needs to be applied. CursorTextMeasureContext is a class provided to emulate the behavior of GetBoundingRectangle for ConstantHeight alignment parameter. The rectangle returned by this class does not usually have an offset and it contains the final advancement of the cursor. From the two rectangles, all values returned by GetBoundingRectangle may be computed.