MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / Get

Method Get

qt/OpenRGBFont.cpp:8–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6OpenRGBFont::OpenRGBFont(){}
7
8OpenRGBFont *OpenRGBFont::Get()
9{
10 if(!instance)
11 {
12 instance = new OpenRGBFont();
13 instance->fontId = QFontDatabase::addApplicationFont(":/fonts/OpenRGB.ttf");
14
15 if(instance->fontId == -1)
16 {
17 printf("Cannot load requested font.\n");
18 }
19 else
20 {
21 QString family = QFontDatabase::applicationFontFamilies(instance->fontId).at(0);
22 instance->font = QFont(family);
23 instance->font.setStyleStrategy(QFont::PreferAntialias);
24 }
25 }
26
27 return instance;
28}
29
30QString OpenRGBFont::icon(int glyph)
31{

Callers 2

APIRequestFunction · 0.45
queryMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected