Use fractional point sizes in wxRichText code
When scaling, just use the floating point result directly instead of rounding it.
This commit is contained in:
@@ -516,8 +516,7 @@ void wxRichTextFontPreviewCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||
|
||||
if ((GetTextEffects() & wxTEXT_ATTR_EFFECT_SUPERSCRIPT) || (GetTextEffects() & wxTEXT_ATTR_EFFECT_SUBSCRIPT))
|
||||
{
|
||||
double fontSize = static_cast<double>(font.GetPointSize()) / wxSCRIPT_MUL_FACTOR;
|
||||
font.SetPointSize( static_cast<int>(fontSize) );
|
||||
font.SetFractionalPointSize(font.GetFractionalPointSize() / wxSCRIPT_MUL_FACTOR);
|
||||
}
|
||||
|
||||
if ( font.IsOk() )
|
||||
|
||||
Reference in New Issue
Block a user