plot - 如何通过 AutoCAD Plot API 在 Forge 设计自动化中使用用户定义的字体
问题描述
我们正在使用 Forge Plot API 将 DWG 绘制为 PDF/JPG。一位客户提出了使用名为 ROBBI.TTF 的特殊 TTF 字体的 DWG。我想这个字体必须先上传到 Forge 服务器才能使用。是否可以一次上传字体,以便我们所有的绘图工作都可以使用它?如果不是:使用自定义 TTF 字体进行绘图的最佳方法是什么?
解决方案
Thomas,是的,您可以将自定义字体包装在 Contents 文件夹下的 apppackage 包中,并引用SupportPath
属性的路径。
<Components>
<RuntimeRequirements
OS="Win64"
Platform="AutoCAD"
SupportPath="./Contents/"/>
<ComponentEntry
AppName="CustomPlotter"
ModuleName="./Contents/PlotLayout.dll"
AppDescription="AutoCAD.IO Reset Plot Layout"
LoadOnCommandInvocation="True"
LoadOnAutoCADStartup="False">
<Commands GroupName="PlotLayoutCommands">
<Command Global="FPDPLOT" Local="FPDPLOT"/>
</Commands>
</ComponentEntry>
</Components>
推荐阅读
- aem - 以编程方式激活 aem 中的页面
- sql - 如何在 SQL 中对行进行分组并总结?
- ios - 即使在 SDK 升级后,Facebook iOS 14.0+ 应用程序安装仍停留在“验证您的更改”
- ocaml - OCaml 中的比较不再是多态的吗?
- vue.js - Vue 的仅运行时构建到底是什么,它与编译器构建有何不同?
- c# - Razor Pages .Net Core - 从 Javascript / AJax 调用 C# 方法
- html - 如何防止网格与页面标题重叠并在调整视口大小时避免滚动条?
- c - 错误:非 void 函数不会在所有控制路径中返回值
- python - 在 Python 中获取 Unix 时间
- usb - 使用 Pi Zero W 模拟 HID 键盘和鼠标