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

(cherry picked from commit e230d5164d)
This commit is contained in:
Jeff Young
2025-07-16 23:20:37 +01:00
parent 593537c52e
commit f10d11d36c
33 changed files with 202 additions and 260 deletions
+2 -8
View File
@@ -136,15 +136,9 @@ void PlotDrawingSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BL
case WSG_TEXT_T:
{
DS_DRAW_ITEM_TEXT* text = (DS_DRAW_ITEM_TEXT*) item;
KIFONT::FONT* font = text->GetFont();
KIFONT::FONT* font = text->GetDrawFont( settings );
COLOR4D color = plotColor;
if( !font )
{
font = KIFONT::FONT::GetFont( settings->GetDefaultFont(), text->IsBold(),
text->IsItalic() );
}
if( plotter->GetColorMode() && text->GetTextColor() != COLOR4D::UNSPECIFIED )
color = text->GetTextColor();
@@ -154,8 +148,8 @@ void PlotDrawingSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BL
text->GetTextAngle(), text->GetTextSize(), text->GetHorizJustify(),
text->GetVertJustify(), penWidth, text->IsItalic(), text->IsBold(),
text->IsMultilineAllowed(), font, text->GetFontMetrics() );
}
break;
}
case WSG_POLY_T:
{