KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KIFONT::METRICS Class Reference

#include <font_metrics.h>

Public Member Functions

double GetOverbarVerticalPosition (double aGlyphHeight) const
 Compute the vertical position of an overbar.
 
double GetUnderlineVerticalPosition (double aGlyphHeight) const
 Compute the vertical position of an underline.
 
double GetInterline (double aFontHeight) const
 

Static Public Member Functions

static const METRICSDefault ()
 

Public Attributes

double m_InterlinePitch = 1.68
 
double m_OverbarHeight = 1.23
 
double m_UnderlineOffset = -0.16
 

Detailed Description

Definition at line 33 of file font_metrics.h.

Member Function Documentation

◆ Default()

◆ GetInterline()

double KIFONT::METRICS::GetInterline ( double aFontHeight) const
inline

◆ GetOverbarVerticalPosition()

double KIFONT::METRICS::GetOverbarVerticalPosition ( double aGlyphHeight) const
inline

Compute the vertical position of an overbar.

This is the distance between the text baseline and the overbar.

Definition at line 40 of file font_metrics.h.

References m_OverbarHeight.

Referenced by drawMarkup(), and PDF_PLOTTER::drawOverbars().

◆ GetUnderlineVerticalPosition()

double KIFONT::METRICS::GetUnderlineVerticalPosition ( double aGlyphHeight) const
inline

Compute the vertical position of an underline.

This is the distance between the text baseline and the underline.

Definition at line 49 of file font_metrics.h.

References m_UnderlineOffset.

Referenced by drawMarkup().

Member Data Documentation

◆ m_InterlinePitch

double KIFONT::METRICS::m_InterlinePitch = 1.68

Definition at line 62 of file font_metrics.h.

Referenced by GetInterline().

◆ m_OverbarHeight

double KIFONT::METRICS::m_OverbarHeight = 1.23

◆ m_UnderlineOffset

double KIFONT::METRICS::m_UnderlineOffset = -0.16

Definition at line 64 of file font_metrics.h.

Referenced by GetUnderlineVerticalPosition().


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