dwg2dwg: how to substitute ALL fonts with one?

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
bumsik-angelswing
Newbie Member
Posts: 8
Joined: Fri Apr 02, 2021 2:24 am

dwg2dwg: how to substitute ALL fonts with one?

Post by bumsik-angelswing » Sat Apr 17, 2021 7:59 am

Hi, I am currently trying to use dwg2dwg to fix the usage of fonts.

So I convert a font into another using the following command:

Code: Select all

~/opt/qcad-3.26.1-pro-linux-x86_64/dwg2dwg -substitute=non_free_font:my_loyalty_free_font -o example_with_free_font.dxf example.dxf
How can I convert all fonts into one, such as:

Code: Select all

~/opt/qcad-3.26.1-pro-linux-x86_64/dwg2dwg "-substitute=*:my_loyalty_free_font" -o example_with_free_font.dxf example.dxf
Using GUI, I kind of can do this because the GUI gives the list of fonts used in the file. But how can I do this in the command line tools?

Thanks!

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

Re: dwg2dwg: how to substitute ALL fonts with one?

Post by andrew » Thu Apr 22, 2021 7:07 am

This argument does not accept wildcards or regular expressions.

You could list the main fonts used in your file with:

Code: Select all

dwg2csv -f -t Text -p "Font Name" myfile.dxf
Note that this will only list the main font of each text but not fonts that are used as part of the formatting.

For example if a text has its font name property set to "Arial" and the text contents is "ABC\fCourier|b0|i0|c0|p0;DEF", this command will list "Arial" but not "Courier". "Arial" is the font name property for the text whereas "Courier" is only used as part of its formatting.

Depending on the formatting used in your file(s), this might or might not be sufficient.

bumsik-angelswing
Newbie Member
Posts: 8
Joined: Fri Apr 02, 2021 2:24 am

Re: dwg2dwg: how to substitute ALL fonts with one?

Post by bumsik-angelswing » Sun Apr 25, 2021 10:23 am

It works! Thank you for your reply!

Post Reply

Return to “QCAD 'How Do I' Questions”