MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / SetFont

Method SetFont

src/gl_text.cpp:225–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223OpenGLText::~OpenGLText() { }
224
225void OpenGLText::SetFont(std::string const& face, int size, bool bold, bool italics) {
226 // No change required
227 if (size == fontSize && face == fontFace && bold == fontBold && italics == fontItalics) return;
228
229 // Set font
230 fontFace = face;
231 fontSize = size;
232 fontBold = bold;
233 fontItalics = italics;
234 font.SetFaceName(to_wx(fontFace));
235 font.SetPointSize(size);
236 font.SetWeight(bold ? wxFONTWEIGHT_BOLD : wxFONTWEIGHT_NORMAL);
237
238 // Delete all old data
239 textures.clear();
240 glyphs.clear();
241}
242
243void OpenGLText::SetColour(agi::Color col) {
244 r = col.r / 255.f;

Callers 13

UpdateStyleMethod · 0.80
OnPaintMethod · 0.80
SetColumnWidthsMethod · 0.80
DrawMethod · 0.80
DialogProgressMethod · 0.80
CalculateTextExtentsFunction · 0.80
AdvancedFunction · 0.80
RenderTextMethod · 0.80
SetDisplayTextMethod · 0.80
OnPaintMethod · 0.80
OpenGLTextGlyphMethod · 0.80

Calls 2

to_wxFunction · 0.70
clearMethod · 0.45

Tested by

no test coverage detected