0

When converting a dwg file using Japanese characters of "HG丸ゴシックM-PRO" font to PDF using PlotToPDF, the Japanese characters become "?".
I want to be able to display this in alternate font.
In the case of the "MSゴシック" font, conversion is possible without problems.

"HG丸ゴシックM-PRO" font is included in MS-Office Japanese version.

I tryed change script to below in PlotToPDF Activity, But the result did not change

"Script": "_FONTALT extfont2.shx\n_layoutcreateviewport 1 _tilemode 0 -export _pdf _all result.pdf\n"

●Target dwg file : jp_test.dwg
●Results of AutoCAD2020 output : AC2020.pdf
●Results of PlotToPDF output : PlotToPDF(23.1).pdf
●Results of PlotToPDF edited script output : PlotToPDF231_JPN.pdf

These are included in the following zip file
https://1drv.ms/u/s!AlrvGXP_bP3HvTNoIvn_FH9wtpnO

Please let me know if there is a solution.

XCoder
  • 31
  • 6

1 Answers1

0

You can bundle custom fonts (HG丸ゴシックM-PRO is obviously not available to our cloud runtime by default) in your appPackage under the Contents folder and specify that path in the SupportPath attribute in your PackageContents.xml for the runtime to pick the fonts up:

<Components>
    <RuntimeRequirements
        OS="Win64"
        Platform="AutoCAD" 
        SupportPath="./Contents/"/>
    <ComponentEntry
        ...
Bryan Huang
  • 5,247
  • 2
  • 15
  • 20
  • Thank you for the advice. I did not understand about appPackage until now. I will create and try. – XCoder Jun 21 '19 at 16:23
  • What is file "PlotLayout.dll"? Where can I get it from? – XCoder Jun 21 '19 at 22:59
  • That's your the assembly of YOUR plugin ... which should be built from your source code - see [here](http://learnforge.autodesk.io/#/designautomation/appbundle/engines/autocad) for details – Bryan Huang Jun 24 '19 at 02:20
  • To add a font, not just place a font file, do I have to create a plug-in? – XCoder Jun 24 '19 at 12:09
  • If I want to use additional fonts, can I not use the PlotToPDF activity? Need to create a program (plugin) for PDF output? – XCoder Jun 24 '19 at 12:14
  • Yes unfortunately you will need to create a plugin of your own to bundle custom fonts – Bryan Huang Jun 25 '19 at 09:53
  • Oh, thank you. It is inefficient to download the entire font every time we call the API. I will try to think of other ways. – XCoder Jun 27 '19 at 10:37
  • You don't need to download the entire font at any time ... but I will let you figure things out – Bryan Huang Jul 01 '19 at 02:43