OSDN Git Service

フォントサイズの計算がおかしかった
[fooeditengine/FooEditEngine.git] / Core / Direct2D / D2DRenderCommon.cs
index fda591c..2bcefac 100644 (file)
@@ -244,7 +244,8 @@ namespace FooEditEngine
             float dpix, dpiy;
             this.GetDpi(out dpix, out dpiy);
 
-            this.format = new DW.TextFormat(D2DRenderShared.DWFactory, fontName, fontWeigth, fontStyle, fontSize);
+            float fontSizeInDIP = fontSize * (dpix / 72.0f);
+            this.format = new DW.TextFormat(D2DRenderShared.DWFactory, fontName, fontWeigth, fontStyle, fontSizeInDIP);
             this.format.WordWrapping = DW.WordWrapping.NoWrap;
             this.format.ReadingDirection = GetDWRightDirect(_RightToLeft);