Example:
SimpleFont baseFont = (SimpleFont)ChartControl.Properties.LabelFont.Clon e();
SharpDX.DirectWrite.TextFormat textFormat = new SharpDX.DirectWrite.TextFormat(Core.Globals.Direct WriteFactory, baseFont.Family.ToString(), SharpDX.DirectWrite.FontWeight.Normal, SharpDX.DirectWrite.FontStyle.Normal, SharpDX.DirectWrite.FontStretch.UltraCondensed, (float)baseFont.Size);
RenderTarget.DrawText("Label", textFormat, reuseRect, myDxBrush);
(reuseRect is a RectangleF)
All works well but when I render text this way on my MS Surface tablet, the rendered font is about half the size it should be. While the font of the chart standard objects are rendering at the correct size. I assume this has something to do with scaling. How do I make sure that my font matches the size of the ChartControl font when rendering text using the DrawText method? Thanks.
Comment