{
if(this.format != null)
this.format.Dispose();
-
- this.format = new DW.TextFormat(this.DWFactory, fontName,fontWeigth,fontStyle, fontSize / 72.0f * 96.0f);
+
+ float dpix, dpiy;
+ this.GetDpi(out dpix, out dpiy);
+
+ this.format = new DW.TextFormat(this.DWFactory, fontName, fontWeigth, fontStyle, fontSize * dpix / 72.0f);
this.format.WordWrapping = DW.WordWrapping.NoWrap;
if (this.HiddenChars == null)
this.hasCache = false;
- float dpix, dpiy;
- this.GetDpi(out dpix, out dpiy);
MyTextLayout layout = new MyTextLayout(this.DWFactory, "0", this.format, float.MaxValue, float.MaxValue, dpix, false);
layout.RightToLeft = false;
this.emSize = new Size(layout.Width, layout.Height);