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

#include <cartotype_graphics_context.h>

Public Member Functions

double BaselineOffset (TextBaseline aBaseline) const
 

Public Attributes

int32_t Size = 0
 
int32_t Ascent = 0
 
int32_t Descent = 0
 
int32_t XHeight = 0
 
int32_t MaxAscent = 0
 
int32_t MaxDescent = 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 CartoTypeCore::FontMetrics::BaselineOffset ( TextBaseline  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

◆ Ascent

int32_t CartoTypeCore::FontMetrics::Ascent = 0

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

◆ Descent

int32_t CartoTypeCore::FontMetrics::Descent = 0

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

◆ MaxAscent

int32_t CartoTypeCore::FontMetrics::MaxAscent = 0

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

◆ MaxDescent

int32_t CartoTypeCore::FontMetrics::MaxDescent = 0

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

◆ Size

int32_t CartoTypeCore::FontMetrics::Size = 0

Design size in pixels per em.

◆ XHeight

int32_t CartoTypeCore::FontMetrics::XHeight = 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: