Skip to content

Commit 2213fea

Browse files
An ugly fix for the "math output is bold" problem.
This fix is ugly, because slow. But it is the only one I managed to come up with on my way to work.
1 parent 7d977c0 commit 2213fea

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/TextCell.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,10 @@ void TextCell::SetFontSizeForLabel(wxDC *dc)
687687
{
688688
wxFont font = (*m_configuration)->GetFont(m_textStyle, GetScaledTextSize());
689689
font.SetPointSize(GetScaledTextSize());
690+
if((*m_configuration)->m_styles[m_textStyle].Bold())
691+
font.SetWeight(wxFONTWEIGHT_BOLD);
692+
else
693+
font.SetWeight(wxFONTWEIGHT_NORMAL);
690694
dc->SetFont(font);
691695
}
692696

@@ -764,6 +768,10 @@ void TextCell::SetFont(int fontsize)
764768

765769
wxASSERT_MSG(font.IsOk(),
766770
_("Seems like something is broken with a font. Installing http://www.math.union.edu/~dpvc/jsmath/download/jsMath-fonts.html and checking \"Use JSmath fonts\" in the configuration dialogue should fix it."));
771+
if((*m_configuration)->m_styles[m_textStyle].Bold())
772+
font.SetWeight(wxFONTWEIGHT_BOLD);
773+
else
774+
font.SetWeight(wxFONTWEIGHT_NORMAL);
767775
dc->SetFont(font);
768776

769777
// A fallback if we have been completely unable to set a working font

0 commit comments

Comments
 (0)