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

后端 未结 5 1291
后悔当初
后悔当初 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:53

    According to XamlToys Doesn't work on framework 4.0???, the problem is in the extension of the file for partial fonts.

    When I renamed the .ofttf files I save to .ttf, it all works again. Haven't got the foggiest idea of why that is though. Seems to be new in .NET 4.0.

提交回复
热议问题