CartoType C++ API 7.8.2, 2022-03-25
for Windows, Linux, Qt and other platforms supporting C++ development
Public Member Functions | Public Attributes | List of all members
CartoType::TFontMetrics Class Reference

#include <cartotype_graphics_context.h>

Public Member Functions

double BaselineOffset (TTextBaseline aBaseline) const
 

Public Attributes

int32_t iSize = 0
 
int32_t iAscent = 0
 
int32_t iDescent = 0
 
int32_t iXHeight = 0
 
int32_t iMaxAscent = 0
 
int32_t iMaxDescent = 0
 

Detailed Description

The metrics of a font: that is a typeface rendered using a certain instance. Metrics such as ascent are in pixels relative to the baseline, with y increasing downwards.

Member Function Documentation

◆ BaselineOffset()

double CartoType::TFontMetrics::BaselineOffset ( TTextBaseline  aBaseline) const

Returns the vertical offset in pixels applied to the baseline for this set of font metrics and the specified baseline type.

Member Data Documentation

◆ iAscent

int32_t CartoType::TFontMetrics::iAscent = 0

Offset of top of Latin capital H (U+0048) from baseline in pixels (normally negative)

◆ iDescent

int32_t CartoType::TFontMetrics::iDescent = 0

Offset of bottom of Latin lowercase p (U+0070) from baseline in pixels (normally positive)

◆ iMaxAscent

int32_t CartoType::TFontMetrics::iMaxAscent = 0

Maximum offset of top of any character from baseline in pixels (normally negative)

◆ iMaxDescent

int32_t CartoType::TFontMetrics::iMaxDescent = 0

Maximum offset of bottom of any character from baseline in pixels (normally positive)

◆ iSize

int32_t CartoType::TFontMetrics::iSize = 0

Design size in pixels per em.

◆ iXHeight

int32_t CartoType::TFontMetrics::iXHeight = 0

Offset of top of Latin lowercase x (U+0078) from baseline in pixels (normally negative)


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