Fix font issues
it's 1:30 AM again :(
This commit is contained in:
parent
cb76e4e444
commit
7783fc7310
@ -274,13 +274,13 @@ void Chat::renderImpl() {
|
||||
m_chatLog->drawImage(m_portraitBackground, Vec2F(imagePosition), 1.0f, fade);
|
||||
m_chatLog->drawImage(message.portrait, Vec2F(imagePosition + m_portraitImageOffset), m_portraitScale, fade);
|
||||
tp.pos += Vec2F(0, floor(messageHeight / 2));
|
||||
m_chatLog->drawText(messageString, tp, m_fontSize, fade, FontMode::Normal, m_chatLineHeight, m_fontDirectives);
|
||||
m_chatLog->drawText(messageString, tp, m_fontSize, fade, FontMode::Normal, m_chatLineHeight, m_font, m_fontDirectives);
|
||||
|
||||
} else {
|
||||
TextPositioning tp = {Vec2F(chatMin), HorizontalAnchor::LeftAnchor, VerticalAnchor::BottomAnchor, wrapWidth};
|
||||
messageHeight = guiContext.determineInterfaceTextSize(messageString, tp).size()[1] + lineHeightMargin;
|
||||
|
||||
m_chatLog->drawText(messageString, tp, m_fontSize, fade, FontMode::Normal, m_chatLineHeight, m_fontDirectives);
|
||||
m_chatLog->drawText(messageString, tp, m_fontSize, fade, FontMode::Normal, m_chatLineHeight, m_font, m_fontDirectives);
|
||||
}
|
||||
|
||||
chatMin[1] += ceil(messageHeight);
|
||||
|
@ -197,6 +197,7 @@ void ChatBubbleManager::addChatActions(List<ChatAction> chatActions, bool silent
|
||||
|
||||
// yea I agree
|
||||
m_guiContext->setFontSize(m_fontSize, m_zoom);
|
||||
m_guiContext->setFontProcessingDirectives("");
|
||||
m_guiContext->setDefaultFont();
|
||||
auto result = m_guiContext->determineTextSize(sayAction.text, m_textTemplate);
|
||||
float textWidth = result.width() / m_zoom + m_textPadding[0];
|
||||
@ -334,6 +335,8 @@ void ChatBubbleManager::drawBubbleText(Vec2F screenPos, BubbleText const& bubble
|
||||
// use the alpha as a blend value for the text colour as pulled from data.
|
||||
Vec4B const& displayColor = Vec4B(baseColor[0], baseColor[1], baseColor[2], (baseColor[3] * alpha) / 255);
|
||||
|
||||
m_guiContext->setDefaultFont();
|
||||
m_guiContext->setFontProcessingDirectives("");
|
||||
m_guiContext->setFontColor(displayColor);
|
||||
m_guiContext->setFontSize(get<1>(bubbleText), m_zoom);
|
||||
|
||||
|
@ -102,6 +102,9 @@ void NameplatePainter::render() {
|
||||
|
||||
context.renderText(*nametag.statusText, statusPosition(bubble.currentPosition));
|
||||
}
|
||||
|
||||
context.setDefaultFont();
|
||||
context.setFontProcessingDirectives("");
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user