Honour renderSettings' default font.

This still leaves a few things out in the cold,
such as hit-testing and polygon generation.
But at least it allows us to plot with a default
font.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19031
This commit is contained in:
Jeff Young
2025-07-17 09:35:21 +01:00
parent 0495828a55
commit e230d5164d
33 changed files with 197 additions and 258 deletions
+1 -2
View File
@@ -1729,9 +1729,8 @@ void PDF_PLOTTER::Text( const VECTOR2I& aPos,
wxStringTokenizer str_tok( aText, " ", wxTOKEN_RET_DELIMS );
// If aFont is not specilied (== nullptr), use the default kicad stroke font
if( !aFont )
aFont = KIFONT::FONT::GetFont();
aFont = KIFONT::FONT::GetFont( m_renderSettings->GetDefaultFont() );
VECTOR2I full_box( aFont->StringBoundaryLimits( aText, t_size, aWidth, aBold, aItalic,
aFontMetrics ) );