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

Class OUTLINE_FONT implements outline font drawing. More...

#include <outline_font.h>

Inheritance diagram for KIFONT::OUTLINE_FONT:
KIFONT::FONT

Public Member Functions

 OUTLINE_FONT ()
 
bool IsOutline () const override
 
bool IsBold () const override
 
bool IsItalic () const override
 
void SetFakeBold ()
 
void SetFakeItal ()
 
double GetInterline (double aGlyphHeight, const METRICS &aFontMetrics) const override
 Compute the distance (interline) between 2 lines of text (for multiline texts).
 
VECTOR2I GetTextAsGlyphs (BOX2I *aBoundingBox, std::vector< std::unique_ptr< GLYPH > > *aGlyphs, const wxString &aText, const VECTOR2I &aSize, const VECTOR2I &aPosition, const EDA_ANGLE &aAngle, bool aMirror, const VECTOR2I &aOrigin, TEXT_STYLE_FLAGS aTextStyle) const override
 Convert text string to an array of GLYPHs.
 
void GetLinesAsGlyphs (std::vector< std::unique_ptr< GLYPH > > *aGlyphs, const wxString &aText, const VECTOR2I &aPosition, const TEXT_ATTRIBUTES &aAttrs, const METRICS &aFontMetrics) const
 
const FT_Face & GetFace () const
 
virtual bool IsStroke () const
 
const wxString & GetName () const
 
const char * NameAsToken () const
 
void Draw (KIGFX::GAL *aGal, const wxString &aText, const VECTOR2I &aPosition, const VECTOR2I &aCursor, const TEXT_ATTRIBUTES &aAttributes, const METRICS &aFontMetrics) const
 Draw a string.
 
void Draw (KIGFX::GAL *aGal, const wxString &aText, const VECTOR2I &aPosition, const TEXT_ATTRIBUTES &aAttributes, const METRICS &aFontMetrics) const
 
VECTOR2I StringBoundaryLimits (const wxString &aText, const VECTOR2I &aSize, int aThickness, bool aBold, bool aItalic, const METRICS &aFontMetrics) const
 Compute the boundary limits of aText (the bounding box of all shapes).
 
void LinebreakText (wxString &aText, int aColumnWidth, const VECTOR2I &aGlyphSize, int aThickness, bool aBold, bool aItalic) const
 Insert
characters into text to ensure that no lines are wider than aColumnWidth.
 

Static Public Member Functions

static OUTLINE_FONTLoadFont (const wxString &aFontFileName, bool aBold, bool aItalic)
 Load an outline font.
 
static bool IsStroke (const wxString &aFontName)
 
static FONTGetFont (const wxString &aFontName=wxEmptyString, bool aBold=false, bool aItalic=false)
 

Protected Member Functions

FT_Error loadFace (const wxString &aFontFileName, int aFaceIndex)
 
BOX2I getBoundingBox (const std::vector< std::unique_ptr< GLYPH > > &aGlyphs) const
 
VECTOR2I getTextAsGlyphs (BOX2I *aBoundingBox, std::vector< std::unique_ptr< GLYPH > > *aGlyphs, const wxString &aText, const VECTOR2I &aSize, const VECTOR2I &aPosition, const EDA_ANGLE &aAngle, bool aMirror, const VECTOR2I &aOrigin, TEXT_STYLE_FLAGS aTextStyle) const
 
unsigned linesCount (const wxString &aText) const
 Returns number of lines for a given text.
 
void drawSingleLineText (KIGFX::GAL *aGal, BOX2I *aBoundingBox, const wxString &aText, const VECTOR2I &aPosition, const VECTOR2I &aSize, const EDA_ANGLE &aAngle, bool aMirror, const VECTOR2I &aOrigin, bool aItalic, bool aUnderline, const METRICS &aFontMetrics) const
 Draws a single line of text.
 
VECTOR2I boundingBoxSingleLine (BOX2I *aBBox, const wxString &aText, const VECTOR2I &aPosition, const VECTOR2I &aSize, bool aItalic, const METRICS &aFontMetrics) const
 Computes the bounding box for a single line of text.
 
void getLinePositions (const wxString &aText, const VECTOR2I &aPosition, wxArrayString &aTextLines, std::vector< VECTOR2I > &aPositions, std::vector< VECTOR2I > &aExtents, const TEXT_ATTRIBUTES &aAttrs, const METRICS &aFontMetrics) const
 
VECTOR2I drawMarkup (BOX2I *aBoundingBox, std::vector< std::unique_ptr< GLYPH > > *aGlyphs, const wxString &aText, const VECTOR2I &aPosition, const VECTOR2I &aSize, const EDA_ANGLE &aAngle, bool aMirror, const VECTOR2I &aOrigin, TEXT_STYLE_FLAGS aTextStyle, const METRICS &aFontMetrics) const
 
void wordbreakMarkup (std::vector< std::pair< wxString, int > > *aWords, const wxString &aText, const VECTOR2I &aSize, TEXT_STYLE_FLAGS aTextStyle) const
 

Protected Attributes

wxString m_fontName
 Font name.
 
wxString m_fontFileName
 Font file name.
 

Private Member Functions

VECTOR2I getTextAsGlyphsUnlocked (BOX2I *aBoundingBox, std::vector< std::unique_ptr< GLYPH > > *aGlyphs, const wxString &aText, const VECTOR2I &aSize, const VECTOR2I &aPosition, const EDA_ANGLE &aAngle, bool aMirror, const VECTOR2I &aOrigin, TEXT_STYLE_FLAGS aTextStyle) const
 
int faceSize (int aSize) const
 
int faceSize () const
 
int subscriptSize (int aSize) const
 
int subscriptSize () const
 

Static Private Member Functions

static FONTgetDefaultFont ()
 

Private Attributes

FT_Face m_face
 
const int m_faceSize
 
bool m_fakeBold
 
bool m_fakeItal
 
std::map< unsigned int, std::vector< std::vector< VECTOR2D > > > m_contourCache
 

Static Private Attributes

static std::mutex m_freeTypeMutex
 Mutex for freetype access, FT_Library and FT_Face are not thread safe.
 
static FT_Library m_freeType = nullptr
 
static constexpr double m_outlineFontSizeCompensation = 1.4
 
static constexpr int m_charSizeScaler = 64
 
static constexpr double m_subscriptSuperscriptSize = 0.64
 
static constexpr double m_underlineOffsetScaler = -0.16
 
static constexpr double m_subscriptVerticalOffset = -0.25
 
static constexpr double m_superscriptVerticalOffset = 0.45
 
static FONTs_defaultFont = nullptr
 
static std::map< std::tuple< wxString, bool, bool >, FONT * > s_fontMap
 

Detailed Description

Class OUTLINE_FONT implements outline font drawing.

Definition at line 51 of file outline_font.h.

Constructor & Destructor Documentation

◆ OUTLINE_FONT()

OUTLINE_FONT::OUTLINE_FONT ( )

Definition at line 43 of file outline_font.cpp.

References m_freeType, and m_freeTypeMutex.

Member Function Documentation

◆ boundingBoxSingleLine()

VECTOR2I FONT::boundingBoxSingleLine ( BOX2I aBBox,
const wxString &  aText,
const VECTOR2I aPosition,
const VECTOR2I aSize,
bool  aItalic,
const METRICS aFontMetrics 
) const
protectedinherited

Computes the bounding box for a single line of text.

Multiline texts should be split before using the function.

Parameters
aBBoxis an optional pointer to be filled with the bounding box.
aTextis the text to be drawn.
aPositionis text position.
aSizeis the cap-height and em-width of the text.
Returns
new cursor position

Definition at line 464 of file font.cpp.

References ANGLE_0, and KIFONT::FONT::drawMarkup().

Referenced by KIFONT::FONT::getLinePositions().

◆ Draw() [1/2]

void KIFONT::FONT::Draw ( KIGFX::GAL aGal,
const wxString &  aText,
const VECTOR2I aPosition,
const TEXT_ATTRIBUTES aAttributes,
const METRICS aFontMetrics 
) const
inlineinherited

Definition at line 164 of file font.h.

◆ Draw() [2/2]

void FONT::Draw ( KIGFX::GAL aGal,
const wxString &  aText,
const VECTOR2I aPosition,
const VECTOR2I aCursor,
const TEXT_ATTRIBUTES aAttrs,
const METRICS aFontMetrics 
) const
inherited

Draw a string.

Parameters
aGalis the graphics context.
aTextis the text to be drawn.
aPositionis the text position in world coordinates.
aCursoris the current text position (for multiple text blocks within a single text object, such as a run of superscript characters)
aAttrsare the styling attributes of the text, including its rotation
aGal
aTextis the text to be drawn.
aPositionis the text object position in world coordinates.
aCursoris the current text position (for multiple text blocks within a single text object, such as a run of superscript characters)
aAttrsare the styling attributes of the text, including its rotation

Definition at line 257 of file font.cpp.

References KIFONT::FONT::drawSingleLineText(), KIFONT::FONT::getLinePositions(), TEXT_ATTRIBUTES::m_Angle, TEXT_ATTRIBUTES::m_Italic, TEXT_ATTRIBUTES::m_Mirrored, TEXT_ATTRIBUTES::m_Size, TEXT_ATTRIBUTES::m_StrokeWidth, TEXT_ATTRIBUTES::m_Underlined, and KIGFX::GAL::SetLineWidth().

Referenced by BOARD_ADAPTER::addText(), KIGFX::GAL::BitmapText(), KIGFX::DS_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::PREVIEW::DrawTextNextToCursor(), drawTicksAlongLine(), EDA_TEXT::GetEffectiveTextShape(), GRPrintText(), KIGFX::SCH_PAINTER::knockoutText(), PLOTTER::PlotText(), KIGFX::SCH_PAINTER::strokeText(), KIGFX::PCB_PAINTER::strokeText(), PLOTTER::Text(), PCB_TEXT::TransformTextToPolySet(), PCB_TEXTBOX::TransformTextToPolySet(), TUNING_STATUS_VIEW_ITEM::ViewDraw(), and ROUTER_STATUS_VIEW_ITEM::ViewDraw().

◆ drawMarkup()

VECTOR2I FONT::drawMarkup ( BOX2I aBoundingBox,
std::vector< std::unique_ptr< GLYPH > > *  aGlyphs,
const wxString &  aText,
const VECTOR2I aPosition,
const VECTOR2I aSize,
const EDA_ANGLE aAngle,
bool  aMirror,
const VECTOR2I aOrigin,
TEXT_STYLE_FLAGS  aTextStyle,
const METRICS aFontMetrics 
) const
protectedinherited

◆ drawSingleLineText()

void FONT::drawSingleLineText ( KIGFX::GAL aGal,
BOX2I aBoundingBox,
const wxString &  aText,
const VECTOR2I aPosition,
const VECTOR2I aSize,
const EDA_ANGLE aAngle,
bool  aMirror,
const VECTOR2I aOrigin,
bool  aItalic,
bool  aUnderline,
const METRICS aFontMetrics 
) const
protectedinherited

Draws a single line of text.

Multiline texts should be split before using the function.

Parameters
aGalis a pointer to the graphics abstraction layer, or nullptr (nothing is drawn)
aBBoxis an optional pointer to be filled with the bounding box.
aTextis the text to be drawn.
aPositionis text position.
aSizeis the cap-height and em-width of the text
aAngleis text angle.
aMirroris true if text should be drawn mirrored, false otherwise.
aOriginis the point around which the text should be rotated, mirrored, etc.
Returns
new cursor position in non-rotated, non-mirrored coordinates

Definition at line 409 of file font.cpp.

References KIGFX::GAL::DrawGlyphs(), and KIFONT::FONT::drawMarkup().

Referenced by KIFONT::FONT::Draw().

◆ faceSize() [1/2]

int KIFONT::OUTLINE_FONT::faceSize ( ) const
inlineprivate

Definition at line 166 of file outline_font.h.

References faceSize().

Referenced by faceSize(), getTextAsGlyphsUnlocked(), and loadFace().

◆ faceSize() [2/2]

int KIFONT::OUTLINE_FONT::faceSize ( int  aSize) const
inlineprivate

Definition at line 162 of file outline_font.h.

◆ getBoundingBox()

BOX2I OUTLINE_FONT::getBoundingBox ( const std::vector< std::unique_ptr< GLYPH > > &  aGlyphs) const
protected

◆ getDefaultFont()

FONT * FONT::getDefaultFont ( )
staticprivateinherited

Definition at line 137 of file font.cpp.

References KIFONT::STROKE_FONT::LoadFont(), and KIFONT::FONT::s_defaultFont.

Referenced by KIFONT::FONT::GetFont().

◆ GetFace()

const FT_Face & KIFONT::OUTLINE_FONT::GetFace ( ) const
inline

Definition at line 99 of file outline_font.h.

Referenced by GetInterline().

◆ GetFont()

FONT * FONT::GetFont ( const wxString &  aFontName = wxEmptyString,
bool  aBold = false,
bool  aItalic = false 
)
staticinherited

Definition at line 146 of file font.cpp.

References KIFONT::FONT::getDefaultFont(), KICAD_FONT_NAME, LoadFont(), and KIFONT::FONT::s_fontMap.

Referenced by LABEL_MANAGER::Add(), BOARD_ADAPTER::addText(), PCB_IO_IPC2581::addText(), SCH_EASYEDAPRO_PARSER::ApplyFontStyle(), KIGFX::GAL::BitmapText(), BOOST_AUTO_TEST_CASE(), KIGFX::SCH_PAINTER::boxText(), ALTIUM_PCB::ConvertTexts6ToEdaTextSettings(), PCB_TEXT::Deserialize(), KIGFX::DS_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), KIGFX::PREVIEW::DrawTextNextToCursor(), drawTicksAlongLine(), SCH_PIN::GetBoundingBox(), EDA_TEXT::getDrawFont(), SCH_FIELD::getDrawFont(), SCH_TEXT::getDrawFont(), SCH_TEXTBOX::getDrawFont(), KIGFX::SCH_PAINTER::getFont(), FONT_CHOICE::GetFontSelection(), SCH_FIELD::GetRenderCache(), GRPrintText(), GRTextWidth(), KIGFX::SCH_PAINTER::knockoutText(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(), SCH_EASYEDA_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSymbolShapes(), DRAWING_SHEET_PARSER::parseText(), PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(), SCH_FIELD::Plot(), SCH_LABEL_BASE::Plot(), SCH_TEXT::Plot(), PlotDrawingSheet(), SCH_PIN::PlotPinTexts(), BRDITEMS_PLOTTER::PlotText(), PLOTTER::PlotText(), SCH_FIELD::Print(), SCH_TEXT::Print(), EDA_TEXT::printOneLineOfText(), SCH_PIN::printPinElectricalTypeName(), SCH_PIN::printPinTexts(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), DRC_TEST_PROVIDER_TEXT_DIMS::Run(), EDA_TEXT::SetFontIndex(), FIELDS_GRID_TABLE::SetValue(), KIGFX::SCH_PAINTER::strokeText(), KIGFX::PCB_PAINTER::strokeText(), PLOTTER::Text(), PDF_PLOTTER::Text(), TUNING_STATUS_VIEW_ITEM::ViewDraw(), and ROUTER_STATUS_VIEW_ITEM::ViewDraw().

◆ GetInterline()

double OUTLINE_FONT::GetInterline ( double  aGlyphHeight,
const METRICS aFontMetrics 
) const
overridevirtual

Compute the distance (interline) between 2 lines of text (for multiline texts).

This is the distance between baselines, not the space between line bounding boxes.

Implements KIFONT::FONT.

Definition at line 111 of file outline_font.cpp.

References GetFace(), and KIFONT::METRICS::GetInterline().

◆ getLinePositions()

◆ GetLinesAsGlyphs()

void OUTLINE_FONT::GetLinesAsGlyphs ( std::vector< std::unique_ptr< GLYPH > > *  aGlyphs,
const wxString &  aText,
const VECTOR2I aPosition,
const TEXT_ATTRIBUTES aAttrs,
const METRICS aFontMetrics 
) const

◆ GetName()

◆ getTextAsGlyphs()

VECTOR2I OUTLINE_FONT::getTextAsGlyphs ( BOX2I aBoundingBox,
std::vector< std::unique_ptr< GLYPH > > *  aGlyphs,
const wxString &  aText,
const VECTOR2I aSize,
const VECTOR2I aPosition,
const EDA_ANGLE aAngle,
bool  aMirror,
const VECTOR2I aOrigin,
TEXT_STYLE_FLAGS  aTextStyle 
) const
protected

Definition at line 246 of file outline_font.cpp.

References getTextAsGlyphsUnlocked(), and m_freeTypeMutex.

Referenced by GetTextAsGlyphs().

◆ GetTextAsGlyphs()

VECTOR2I OUTLINE_FONT::GetTextAsGlyphs ( BOX2I aBBox,
std::vector< std::unique_ptr< GLYPH > > *  aGlyphs,
const wxString &  aText,
const VECTOR2I aSize,
const VECTOR2I aPosition,
const EDA_ANGLE aAngle,
bool  aMirror,
const VECTOR2I aOrigin,
TEXT_STYLE_FLAGS  aTextStyle 
) const
overridevirtual

Convert text string to an array of GLYPHs.

Parameters
aBBoxpointer to a BOX2I that will set to the bounding box, or nullptr
aGlyphsstorage for the returned GLYPHs
aTexttext to convert to polygon/polyline
aSizeis the cap-height and em-width of the text
aPositionposition of text (cursor position before this text)
aAngletext angle
aMirroris true if text should be drawn mirrored, false otherwise.
aOriginis the point around which the text should be rotated, mirrored, etc.
aTextStyletext style flags
Returns
text cursor position after this text

Implements KIFONT::FONT.

Definition at line 194 of file outline_font.cpp.

References getTextAsGlyphs(), KiROUND(), BOX2< Vec >::SetEnd(), BOX2< Vec >::SetOrigin(), and VECTOR2< T >::x.

◆ getTextAsGlyphsUnlocked()

◆ IsBold()

bool KIFONT::OUTLINE_FONT::IsBold ( ) const
inlineoverridevirtual

Reimplemented from KIFONT::FONT.

Definition at line 58 of file outline_font.h.

◆ IsItalic()

bool KIFONT::OUTLINE_FONT::IsItalic ( ) const
inlineoverridevirtual

Reimplemented from KIFONT::FONT.

Definition at line 63 of file outline_font.h.

◆ IsOutline()

bool KIFONT::OUTLINE_FONT::IsOutline ( ) const
inlineoverridevirtual

Reimplemented from KIFONT::FONT.

Definition at line 56 of file outline_font.h.

◆ IsStroke() [1/2]

◆ IsStroke() [2/2]

bool FONT::IsStroke ( const wxString &  aFontName)
staticinherited

Definition at line 170 of file font.cpp.

References _, and KICAD_FONT_NAME.

◆ LinebreakText()

void FONT::LinebreakText ( wxString &  aText,
int  aColumnWidth,
const VECTOR2I aGlyphSize,
int  aThickness,
bool  aBold,
bool  aItalic 
) const
inherited

Insert
characters into text to ensure that no lines are wider than aColumnWidth.

Definition at line 588 of file font.cpp.

References ANGLE_0, KIFONT::FONT::GetTextAsGlyphs(), KIFONT::FONT::wordbreakMarkup(), wxStringSplit(), and VECTOR2< T >::x.

Referenced by PCB_TEXTBOX::GetShownText(), and SCH_TEXTBOX::GetShownText().

◆ linesCount()

unsigned KIFONT::FONT::linesCount ( const wxString &  aText) const
inlineprotectedinherited

Returns number of lines for a given text.

Parameters
aTextis the text to be checked.
Returns
unsigned - The number of lines in aText.

Definition at line 217 of file font.h.

◆ loadFace()

FT_Error OUTLINE_FONT::loadFace ( const wxString &  aFontFileName,
int  aFaceIndex 
)
protected

Definition at line 85 of file outline_font.cpp.

References faceSize(), KIFONT::GLYPH_RESOLUTION, m_face, m_freeType, and m_freeTypeMutex.

◆ LoadFont()

OUTLINE_FONT * OUTLINE_FONT::LoadFont ( const wxString &  aFontFileName,
bool  aBold,
bool  aItalic 
)
static

Load an outline font.

TrueType (.ttf) and OpenType (.otf) are supported.

Parameters
aFontFileNameis the (platform-specific) fully qualified name of the font file

Definition at line 56 of file outline_font.cpp.

References Fontconfig().

Referenced by KIFONT::FONT::GetFont().

◆ NameAsToken()

const char * KIFONT::FONT::NameAsToken ( ) const
inlineinherited

Definition at line 148 of file font.h.

Referenced by DS_DATA_MODEL_IO::format().

◆ SetFakeBold()

void KIFONT::OUTLINE_FONT::SetFakeBold ( )
inline

Definition at line 68 of file outline_font.h.

◆ SetFakeItal()

void KIFONT::OUTLINE_FONT::SetFakeItal ( )
inline

Definition at line 73 of file outline_font.h.

◆ StringBoundaryLimits()

VECTOR2I FONT::StringBoundaryLimits ( const wxString &  aText,
const VECTOR2I aSize,
int  aThickness,
bool  aBold,
bool  aItalic,
const METRICS aFontMetrics 
) const
inherited

Compute the boundary limits of aText (the bounding box of all shapes).

Returns
a VECTOR2I giving the width and height of text.

Definition at line 434 of file font.cpp.

References ANGLE_0, boundingBox(), KIFONT::FONT::drawMarkup(), BOX2< Vec >::GetSize(), BOX2< Vec >::Inflate(), KIFONT::FONT::IsOutline(), KIFONT::FONT::IsStroke(), and KiROUND().

Referenced by LABEL_MANAGER::Add(), KIGFX::SCH_PAINTER::boxText(), EDA_TEXT::GetTextBox(), GRTextWidth(), PDF_PLOTTER::Text(), and SCH_PIN::validateExtentsCache().

◆ subscriptSize() [1/2]

int KIFONT::OUTLINE_FONT::subscriptSize ( ) const
inlineprivate

Definition at line 173 of file outline_font.h.

References subscriptSize().

Referenced by getTextAsGlyphsUnlocked(), and subscriptSize().

◆ subscriptSize() [2/2]

int KIFONT::OUTLINE_FONT::subscriptSize ( int  aSize) const
inlineprivate

Definition at line 169 of file outline_font.h.

References KiROUND().

◆ wordbreakMarkup()

void FONT::wordbreakMarkup ( std::vector< std::pair< wxString, int > > *  aWords,
const wxString &  aText,
const VECTOR2I aSize,
TEXT_STYLE_FLAGS  aTextStyle 
) const
protectedinherited

Member Data Documentation

◆ m_charSizeScaler

constexpr int KIFONT::OUTLINE_FONT::m_charSizeScaler = 64
staticconstexprprivate

Definition at line 151 of file outline_font.h.

◆ m_contourCache

std::map<unsigned int, std::vector<std::vector<VECTOR2D> > > KIFONT::OUTLINE_FONT::m_contourCache
private

Definition at line 141 of file outline_font.h.

◆ m_face

FT_Face KIFONT::OUTLINE_FONT::m_face
private

Definition at line 133 of file outline_font.h.

Referenced by getTextAsGlyphsUnlocked(), and loadFace().

◆ m_faceSize

const int KIFONT::OUTLINE_FONT::m_faceSize
private

Definition at line 135 of file outline_font.h.

◆ m_fakeBold

bool KIFONT::OUTLINE_FONT::m_fakeBold
private

Definition at line 136 of file outline_font.h.

Referenced by getTextAsGlyphsUnlocked().

◆ m_fakeItal

bool KIFONT::OUTLINE_FONT::m_fakeItal
private

Definition at line 137 of file outline_font.h.

Referenced by getTextAsGlyphsUnlocked().

◆ m_fontFileName

wxString KIFONT::FONT::m_fontFileName
protectedinherited

Font file name.

Definition at line 277 of file font.h.

Referenced by KIFONT::STROKE_FONT::loadNewStrokeFont().

◆ m_fontName

wxString KIFONT::FONT::m_fontName
protectedinherited

Font name.

Definition at line 276 of file font.h.

Referenced by KIFONT::STROKE_FONT::loadNewStrokeFont().

◆ m_freeType

FT_Library OUTLINE_FONT::m_freeType = nullptr
staticprivate

Definition at line 132 of file outline_font.h.

Referenced by loadFace(), and OUTLINE_FONT().

◆ m_freeTypeMutex

std::mutex OUTLINE_FONT::m_freeTypeMutex
staticprivate

Mutex for freetype access, FT_Library and FT_Face are not thread safe.

Definition at line 131 of file outline_font.h.

Referenced by getTextAsGlyphs(), loadFace(), and OUTLINE_FONT().

◆ m_outlineFontSizeCompensation

constexpr double KIFONT::OUTLINE_FONT::m_outlineFontSizeCompensation = 1.4
staticconstexprprivate

Definition at line 148 of file outline_font.h.

Referenced by getTextAsGlyphsUnlocked().

◆ m_subscriptSuperscriptSize

constexpr double KIFONT::OUTLINE_FONT::m_subscriptSuperscriptSize = 0.64
staticconstexprprivate

Definition at line 158 of file outline_font.h.

◆ m_subscriptVerticalOffset

constexpr double KIFONT::OUTLINE_FONT::m_subscriptVerticalOffset = -0.25
staticconstexprprivate

Definition at line 175 of file outline_font.h.

Referenced by getTextAsGlyphsUnlocked().

◆ m_superscriptVerticalOffset

constexpr double KIFONT::OUTLINE_FONT::m_superscriptVerticalOffset = 0.45
staticconstexprprivate

Definition at line 176 of file outline_font.h.

Referenced by getTextAsGlyphsUnlocked().

◆ m_underlineOffsetScaler

constexpr double KIFONT::OUTLINE_FONT::m_underlineOffsetScaler = -0.16
staticconstexprprivate

Definition at line 160 of file outline_font.h.

◆ s_defaultFont

FONT * FONT::s_defaultFont = nullptr
staticprivateinherited

Definition at line 280 of file font.h.

Referenced by KIFONT::FONT::getDefaultFont().

◆ s_fontMap

std::map< std::tuple< wxString, bool, bool >, FONT * > FONT::s_fontMap
staticprivateinherited

Definition at line 282 of file font.h.

Referenced by KIFONT::FONT::GetFont().


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