[System.Drawing.Text.PrivateFontCollection],OTF字体,Windows 7 / PS2.0

问题描述

在Windows 10中运行正常

$fontFilePath = '\\px\Rollouts\Misc\Fonts\Myriad Pro\MyriadPro-Cond.otf'
$fontCollection = New-Object System.Drawing.Text.PrivateFontCollection
$fontCollection.AddFontFile($fontFilePath)

但是在Windows 7 / PS2中我得到Exception calling "AddFontFile" with "1" argument(s): "File not found."。但是TTF字体可以正常工作。因此,我认为PS2.0中的[System.Drawing.Text.PrivateFontCollection]不支持OpenType字体吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)