Browse Source

Projucer: Apply typeface name to font when loading painted text from XML

tags/2021-05-28
ed 7 years ago
parent
commit
aea1aac48c
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementText.h

+ 1
- 0
extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementText.h View File

@@ -147,6 +147,7 @@ public:

text = xml.getStringAttribute ("text", "Hello World");
typefaceName = xml.getStringAttribute ("fontname", FontPropertyComponent::getDefaultFont());
font = FontPropertyComponent::applyNameToFont (typefaceName, font);
font.setHeight ((float) xml.getDoubleAttribute ("fontsize", 15.0));
font.setBold (xml.getBoolAttribute ("bold", false));
font.setItalic (xml.getBoolAttribute ("italic", false));


Loading…
Cancel
Save