CartoType C++ API 8.8-7-gb35e4dc71
for Windows, Linux, Qt and other platforms supporting C++ development
Public Attributes | List of all members
CartoTypeCore::TextParam Class Reference

#include <cartotype_graphics_context.h>

Public Attributes

int32_t MaxWidth = INT32_MAX
 
const CFlatPath * FlatPath = nullptr
 
double PathStart = 0
 
double MaxTurnSine = 0.5
 
TextBaseline Baseline = TextBaseline::Alphabetic
 
double BaselineOffset = 0
 
double LetterSpacing = 0
 
double WordSpacing = 0
 
double MaxCopyFitExpansion = 4
 
size_t Fonts = 0
 
const CartoTypeCore::FontFont = nullptr
 
bool TraversePathBackwards: 1
 
bool CopyFit: 1
 

Detailed Description

Parameters to control the way text is drawn or measured.

Member Data Documentation

◆ Baseline

TextBaseline CartoTypeCore::TextParam::Baseline = TextBaseline::Alphabetic

The type of the baseline used to align the text.

◆ BaselineOffset

double CartoTypeCore::TextParam::BaselineOffset = 0

The baseline offset in pixels. This value is added to the baseline's y coordinate. It can be used to shift the text away from the path it is drawn along, for example when drawing a road label beside the road instead of along the road.

◆ CopyFit

bool CartoTypeCore::TextParam::CopyFit

If drawing text on a path, stretch it out to fit the path by adding letter spacing and word spacing.

◆ FlatPath

const CFlatPath* CartoTypeCore::TextParam::FlatPath = nullptr

If iFlatPath is non-null the text is drawn along the path, which is relative to the origin passed to DrawText.

◆ Font

const CartoTypeCore::Font* CartoTypeCore::TextParam::Font = nullptr

A pointer to an array of fonts, to be selected using special characters embedded in the text. This pointer must be non-null if iFonts is greater than zero.

◆ Fonts

size_t CartoTypeCore::TextParam::Fonts = 0

The number of fonts in Font. An array of fonts can be supplied to override the Font object used to draw or measure the text, and thus allow rich text to be drawn.

◆ LetterSpacing

double CartoTypeCore::TextParam::LetterSpacing = 0

Letter spacing in pixels. This value is added to all character advances.

◆ MaxCopyFitExpansion

double CartoTypeCore::TextParam::MaxCopyFitExpansion = 4

The greatest factor by which a string can be expanded when copy-fitting by adding letter spacing and word spacing. The default value is 4.

◆ MaxTurnSine

double CartoTypeCore::TextParam::MaxTurnSine = 0.5

If drawing on a path, the sine of the maximum tolerated angle between baselines of successive characters. The default is 0.5 = sin(30 degrees).

◆ MaxWidth

int32_t CartoTypeCore::TextParam::MaxWidth = INT32_MAX

If the text cannot be fitted into iMaxWidth, measured along the baseline in pixels, it is truncated.

◆ PathStart

double CartoTypeCore::TextParam::PathStart = 0

If drawing along a path, the distance along the path to start at.

◆ TraversePathBackwards

bool CartoTypeCore::TextParam::TraversePathBackwards

If drawing text on a path, traverse the path backwards.

◆ WordSpacing

double CartoTypeCore::TextParam::WordSpacing = 0

Word spacing in pixels. This value is added to the advance of word spaces.


The documentation for this class was generated from the following file: