Skip to content

Commit

Permalink
Merge branch 'master' into myocpn
Browse files Browse the repository at this point in the history
  • Loading branch information
Hakansv committed Jan 7, 2025
2 parents 6ad7acc + ef5ed77 commit 75f9e26
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions gui/src/FontMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,9 @@ wxFont *FontMgr::GetFont(const wxString &TextElement, int requested_font_size) {
auto node = m_fontlist->GetFirst();
while (node) {
pmfd = node->GetData();
// Check if the font matches both the text element and the requested size
if ((pmfd->m_configstring.BeforeFirst('-') == s_locale) &&
(requested_font_size == 0 ||
pmfd->m_font->GetPointSize() == requested_font_size)) {
return pmfd->m_font;
if (pmfd->m_dialogstring == TextElement) {
if (pmfd->m_configstring.BeforeFirst('-') == s_locale)
return pmfd->m_font;
}
node = node->GetNext();
}
Expand Down

0 comments on commit 75f9e26

Please sign in to comment.