Windows 10でインストール済みのフォントの一覧をテキストファイルで得たい用事があった。 こんな簡単なことなのだが、ぴったりの例を探すことができなかった。 ちゃんとPowerShellを体系的に理解しないといけないが、以下のようにすれば動く。
[void] [system.reflection.assembly]::loadwithpartialname("system.drawing")
(new-object system.drawing.text.installedfontcollection).families.name | out-file fonts.txt
http://codegists.com/snippet/powershell/displayallfontsps1_matthewjberger_powershell が参考になった。
No comments:
Post a Comment