KiCad PCB EDA Suite
Loading...
Searching...
No Matches
stroke_font.cpp File Reference
#include <gal/graphics_abstraction_layer.h>
#include <wx/string.h>
#include <wx/textfile.h>
#include <newstroke_font.h>
#include <font/glyph.h>
#include <font/stroke_font.h>
#include <geometry/shape_line_chain.h>
#include <trigo.h>
#include <font/kicad_font_name.h>
#include <mutex>

Go to the source code of this file.

Functions

void buildGlyphBoundingBox (std::shared_ptr< STROKE_GLYPH > &aGlyph, double aGlyphWidth)
 

Variables

static constexpr double STROKE_FONT_SCALE = 1.0 / 21.0
 < Scale factor for a glyph
 
static constexpr int FONT_OFFSET = -8
 
bool g_defaultFontInitialized = false
 
std::vector< std::shared_ptr< GLYPH > > g_defaultFontGlyphs
 
std::vector< BOX2D > * g_defaultFontGlyphBoundingBoxes
 
std::mutex g_defaultFontLoadMutex
 

Function Documentation

◆ buildGlyphBoundingBox()

void buildGlyphBoundingBox ( std::shared_ptr< STROKE_GLYPH > &  aGlyph,
double  aGlyphWidth 
)

Definition at line 81 of file stroke_font.cpp.

References VECTOR2< T >::y.

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

Variable Documentation

◆ FONT_OFFSET

constexpr int FONT_OFFSET = -8
staticconstexpr

Definition at line 48 of file stroke_font.cpp.

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

◆ g_defaultFontGlyphBoundingBoxes

std::vector<BOX2D>* g_defaultFontGlyphBoundingBoxes

Definition at line 53 of file stroke_font.cpp.

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

◆ g_defaultFontGlyphs

std::vector<std::shared_ptr<GLYPH> > g_defaultFontGlyphs

Definition at line 52 of file stroke_font.cpp.

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

◆ g_defaultFontInitialized

bool g_defaultFontInitialized = false

Definition at line 51 of file stroke_font.cpp.

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

◆ g_defaultFontLoadMutex

std::mutex g_defaultFontLoadMutex

Definition at line 54 of file stroke_font.cpp.

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

◆ STROKE_FONT_SCALE

constexpr double STROKE_FONT_SCALE = 1.0 / 21.0
staticconstexpr

< Scale factor for a glyph

Offset (in stroke font units) to move the origin to the baseline.

Definition at line 45 of file stroke_font.cpp.

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