diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-21 22:29:40 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-21 22:29:40 +1000 |
commit | f0fec34dc9c2dbc86dd424e4963983cbb2ed9b41 (patch) | |
tree | 9073336184d32365b861df91b2fc062c39e0fb15 /source/frontend/StarChat.cpp | |
parent | 865f9a328a9068c9917c52c387f27b3e102712bc (diff) |
The Fontpocalypse
I hate it
Diffstat (limited to 'source/frontend/StarChat.cpp')
-rw-r--r-- | source/frontend/StarChat.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/frontend/StarChat.cpp b/source/frontend/StarChat.cpp index b89bd4e..236d207 100644 --- a/source/frontend/StarChat.cpp +++ b/source/frontend/StarChat.cpp @@ -24,6 +24,7 @@ Chat::Chat(UniverseClientPtr client) : m_client(client) { auto fontConfig = assets->json("/interface/chat/chat.config:config.font"); m_fontSize = fontConfig.getInt("baseSize"); m_fontDirectives = fontConfig.queryString("directives", ""); + m_font = fontConfig.queryString("type", ""); m_chatLineHeight = assets->json("/interface/chat/chat.config:config.lineHeight").toFloat(); m_chatVisTime = assets->json("/interface/chat/chat.config:config.visTime").toFloat(); m_fadeRate = assets->json("/interface/chat/chat.config:config.fadeRate").toDouble(); @@ -178,6 +179,7 @@ void Chat::addMessages(List<ChatReceivedMessage> const& messages, bool showPane) if (message.portrait.empty()) wrapWidth = m_chatLog->size()[0]; + guiContext.setFont(m_font); guiContext.setFontSize(m_fontSize); StringList lines; if (message.fromNick != "" && message.portrait == "") @@ -237,6 +239,7 @@ void Chat::renderImpl() { int messageIndex = -m_historyOffset; GuiContext& guiContext = GuiContext::singleton(); + guiContext.setFont(m_font); guiContext.setFontSize(m_fontSize); guiContext.setLineSpacing(m_chatLineHeight); for (auto message : m_receivedMessages) { @@ -284,6 +287,7 @@ void Chat::renderImpl() { } guiContext.setDefaultLineSpacing(); + guiContext.setDefaultFont(); } void Chat::hide() { |