前回↓ WPFで外字を表示する その1 Windowsでの外字ファイルの仕組みを踏まえて、WPFで外字を表示するにはレジストリから外字ファイルのパスを取得し、そのパスで明示的にフォントファミリへ外字を追加するコードを書き加える必要がある。 システム全体で外字を利用するには以下のようなコードになる。 こちらも参照↓ WPFでアプリのデフォルトのフォントを変える public partial class App : Application { public App() { var ffDef = Window.FontFamilyProperty.DefaultMetadata.DefaultValue as System.Windows.Media.FontFamily; var ffName = ffDef.Source; string eudc = "C:\\Windows\\Fonts
![C#のWPFで外字を表示する その2](https://cdn-ak-scissors.b.st-hatena.com/image/square/f19216913c2dd0cb4769bb5b7db4f198b0236659/height=288;version=1;width=512/https%3A%2F%2Fimage.jimcdn.com%2Fapp%2Fcms%2Fimage%2Ftransf%2Fnone%2Fpath%2Fsbabc3a4f4a68ba4b%2Fimage%2Fi5b78c637f88afca7%2Fversion%2F1680501658%2Fimage.png)