问题
We are using the Forge Plot API to plot DWGs to PDF/JPG. A customer came up with DWGs that are using a special TTF-Font called ROBBI.TTF. I suppose this font has to be uploaded to the Forge server before it can be used. Is it possible to upload the font once, so that it can be used for all our plot jobs? If not: What is the best way to plot using a custom TTF font?
回答1:
Thomas, yes, you can wrap custom fonts in your apppackage bundle under Contents folder and refer the path to SupportPath
attribute.
<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>
来源:https://stackoverflow.com/questions/54751199/how-to-use-user-defined-font-on-forge-design-automation-with-autocad-plot-api