KiCad PCB EDA Suite
Loading...
Searching...
No Matches
font.cpp File Reference
#include <list>
#include <mutex>
#include <unordered_map>
#include <macros.h>
#include <string_utils.h>
#include <gal/graphics_abstraction_layer.h>
#include <font/stroke_font.h>
#include <font/outline_font.h>
#include <trigo.h>
#include <markup_parser.h>
#include <font/kicad_font_name.h>
#include <wx/tokenzr.h>

Go to the source code of this file.

Classes

class  MARKUP_CACHE
 
struct  MARKUP_CACHE::ENTRY
 

Functions

VECTOR2I drawMarkup (BOX2I *aBoundingBox, std::vector< std::unique_ptr< GLYPH > > *aGlyphs, const MARKUP::NODE *aNode, const VECTOR2I &aPosition, const KIFONT::FONT *aFont, const VECTOR2I &aSize, const EDA_ANGLE &aAngle, bool aMirror, const VECTOR2I &aOrigin, TEXT_STYLE_FLAGS aTextStyle, const METRICS &aFontMetrics)
 
void wordbreakMarkup (std::vector< std::pair< wxString, int > > *aWords, const std::unique_ptr< MARKUP::NODE > &aNode, const KIFONT::FONT *aFont, const VECTOR2I &aSize, TEXT_STYLE_FLAGS aTextStyle)
 

Variables

METRICS g_defaultMetrics
 
static MARKUP_CACHE s_markupCache (1024)
 
static std::mutex s_markupCacheMutex
 

Function Documentation

◆ drawMarkup()

VECTOR2I drawMarkup ( BOX2I aBoundingBox,
std::vector< std::unique_ptr< GLYPH > > *  aGlyphs,
const MARKUP::NODE aNode,
const VECTOR2I aPosition,
const KIFONT::FONT aFont,
const VECTOR2I aSize,
const EDA_ANGLE aAngle,
bool  aMirror,
const VECTOR2I aOrigin,
TEXT_STYLE_FLAGS  aTextStyle,
const METRICS aFontMetrics 
)

◆ wordbreakMarkup()

void wordbreakMarkup ( std::vector< std::pair< wxString, int > > *  aWords,
const std::unique_ptr< MARKUP::NODE > &  aNode,
const KIFONT::FONT aFont,
const VECTOR2I aSize,
TEXT_STYLE_FLAGS  aTextStyle 
)

Definition at line 484 of file font.cpp.

References ANGLE_0, KIFONT::FONT::GetTextAsGlyphs(), next(), and wordbreakMarkup().

Referenced by wordbreakMarkup().

Variable Documentation

◆ g_defaultMetrics

METRICS g_defaultMetrics

Definition at line 49 of file font.cpp.

Referenced by KIFONT::METRICS::Default().

◆ s_markupCache

MARKUP_CACHE s_markupCache(1024) ( 1024  )
static

◆ s_markupCacheMutex

std::mutex s_markupCacheMutex
static

Definition at line 129 of file font.cpp.

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