我使用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>
你明白了:
任何解决方案/想法如何从两个控件获取相同的渲染文本?