Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/class
diff options
context:
space:
mode:
authorKarl <karl@scowencomputers.co.nz>2015-09-12 12:05:38 +0300
committerKarl <karl@scowencomputers.co.nz>2020-01-13 06:42:44 +0300
commit681b514e888e1af11bb318eb1170ebf651e3ca07 (patch)
tree6566192d688eec6767ab1de5ff5d251f761ba8ee /mcs/class
parentdbf98ffc93645e1e364ec16cf0ce371cac6a4edb (diff)
Use a float for the RTF font size to avoid rounding error when dividing by two to get the point size.
Diffstat (limited to 'mcs/class')
-rw-r--r--mcs/class/System.Windows.Forms/System.Windows.Forms/RichTextBox.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/RichTextBox.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/RichTextBox.cs
index bafacd7634d..b9a77f613f8 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/RichTextBox.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/RichTextBox.cs
@@ -1615,7 +1615,7 @@ namespace System.Windows.Forms {
internal Color rtf_color;
internal Color rtf_back_color;
internal RTF.Font rtf_rtffont;
- internal int rtf_rtffont_size;
+ internal float rtf_rtffont_size;
internal FontStyle rtf_rtfstyle;
internal HorizontalAlignment rtf_rtfalign;
internal int rtf_par_line_left_indent;
@@ -1755,7 +1755,7 @@ namespace System.Windows.Forms {
case RTF.Minor.FontSize: {
FlushText(rtf, false);
- this.rtf_style.rtf_rtffont_size = rtf.Param / 2;
+ this.rtf_style.rtf_rtffont_size = rtf.Param / 2f;
break;
}