powershell - [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 字体可以正常工作。所以我认为[System.Drawing.Text.PrivateFontCollection]
PS2.0 不支持 OpenType 字体?
解决方案
推荐阅读
- c# - 反序列化没有属性名称的 JObject
- java - 如何在 BlueJ 中向 Java JFrame 添加音频?
- spring-kafka - 消费者未收到 Spring Cloud 流绑定器 Kafka 自定义标头
- javascript - 当“node_modules”退出时,“npm install”是什么?
- qt - 如何将 QPaintedTextureImage 加载到 QTextureMaterial 中?
- r - 如何识别R中具有重复值的列的名称
- linux - DBD-Oracle (1.74 or 1.76) with oracle instantclient 11.2 on win10 wsl ubuntu
- python - 从 python 访问 conda 环境变量
- laravel - 此路由不支持 DELETE 方法。支持的方法:GET、HEAD、POST
- c++ - 当我在谷歌测试程序中定义一个 const 字符串时,为什么会发生分段错误?