substitute font and other

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
HuachenLi
Newbie Member
Posts: 6
Joined: Sun Aug 14, 2016 7:59 am

substitute font and other

Post by HuachenLi » Thu Sep 01, 2016 3:40 pm

Hi,

I am trying qcad and dwg2pdf to view and convert dwg files.
But there are 2 problems now.

1. Chinese text can not be shown correctly(??? or incorrect word) when font is not found.
2. Some dwg files are not shown.

Could you please tell me
1. Is there any setting for global font substitute to force all text(or missing font text only) to use substitute font.
2. Why does these dwg files are not shown?

Thanks,
Huachen

-----------------------
sample dwg files are in google drive
https://drive.google.com/file/d/0B9lnst ... sp=sharing
https://drive.google.com/file/d/0B9lnst ... sp=sharing

qcad: V3.15.5 on MAC OSX 10.11
dwg2pdf: V3.15.4 on Ubuntu 14.04

User avatar
andrew
Site Admin
Posts: 9061
Joined: Fri Mar 30, 2007 6:07 am

Re: substitute font and other

Post by andrew » Thu Sep 01, 2016 3:57 pm

For font substitution, you can use the -font-substitution or -fs switch:

dwg2pdf -fs SimSun Arial -k -a -f -o ./TextNotCorrect.pdf ./TextNotCorrect.dwg

notshown.dwg contains a drawing which is located at around 38380000/3830000. However, there are also some objects close to 0/0, so when auto zoom fits the entire drawing on the paper, it becomes so tiny that it is invisible. You might want to load the file in QCAD and perform an auto zoom to see what the problem is.

HuachenLi
Newbie Member
Posts: 6
Joined: Sun Aug 14, 2016 7:59 am

Re: substitute font and other

Post by HuachenLi » Thu Sep 15, 2016 1:12 pm

Hi Andrew,

Thanks a lot.

HuachenLi
Newbie Member
Posts: 6
Joined: Sun Aug 14, 2016 7:59 am

Re: substitute font and other

Post by HuachenLi » Mon Sep 19, 2016 2:48 pm

Hi Andrew,

I have tried your command line on dwg2pdf (qcad3.15.5-pro), but the result is not same as expected.
The expected result is uploaded.
TextNotCorrect_expected.pdf
(317.47 KiB) Downloaded 328 times
Two problems:
1. Only part of objects are shown.
2. Chinese text is NOT correctly shown by your command line.

Could you please to help to check it?

Thanks,
Huachen

User avatar
andrew
Site Admin
Posts: 9061
Joined: Fri Mar 30, 2007 6:07 am

Re: substitute font and other

Post by andrew » Tue Sep 20, 2016 5:23 pm

Thanks for the PDF. The file you have uploaded shows the block *PAPER_SPACE. dwg2pdf always outputs the block *MODEL_SPACE. Newer versions of dwg2pdf (and the other command line tools) offer a -block switch to specify which block should be output:

./dwg2pdf -block="*PAPER_SPACE" -l -a -n -f -o TextNotCorrect.pdf TextNotCorrect.dwg

The issue with the text codec should also be fixed meanwhile.

I've attached the output of the above command line with the current development version of QCAD.
Attachments
TextNotCorrect.pdf
(60.94 KiB) Downloaded 287 times

Post Reply

Return to “QCAD 'How Do I' Questions”