WPF - Saving font to disk, then instantiating GlyphTypeface for font throws exception. Why?

后端 未结 5 1264
后悔当初
后悔当初 2021-01-12 19:47

I am mucking about with WPF glyphs and documents and have run into a null reference exception in the .Net 4 framework.

I extract and save true-type fonts to disk as

5条回答
  •  离开以前
    2021-01-12 19:50

    My workaround was to simply replace the < Glyphs > with equavalent < TextBlock >s. The couple of pixels difference in layout was not a problem in my case.

    Like you noted was the case for you, in my case also it was not a problem in .Net 3.5, but appeared in .Net 4.0.

提交回复
热议问题