WPF GlyphRun vs TextBox

时间:2016-04-30 22:51:18

标签: wpf

我使用GlyphRuns在我的WPF应用程序中优化了渲染。

问题是,GlyphRuns和TextBox有不同的渲染结果!

示例:

<Glyphs
     FontUri             = "C:\WINDOWS\Fonts\TIMES.TTF"
     FontRenderingEmSize = "20"
     UnicodeString       = "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
     Fill                = "Black"
     OriginX             = "5"
     OriginY             = "21"
  />
    <TextBox Background="Transparent" FontFamily="Times New Roman" FontSize="20">fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff</TextBox>

你明白了:

enter image description here

任何解决方案/想法如何从两个控件获取相同的渲染文本?

0 个答案:

没有答案