How to use user defined font on Forge design automation with AutoCAD Plot API

痴心易碎 提交于 2021-02-05 09:34:26

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!