Jump to content

Recommended Posts

Posted (edited)

Hello everyone,

I'm looking for the DXf code of Font style to set a style to Bold, I also set code 4 to "Bold" but it's not working

 

(entmake
(list
'(0 . "STYLE")
'(100 . "AcDbSymbolTableRecord")
'(100 . "AcDbTextStyleTableRecord")
'(2 . "C3Wall")
'(70 . 0)
'(40 . 0.0)
'(41 . 1.0)
'(50 . 0.0)
'(71 . 0)
'(42 . 0.09375)
'(3 . "Arial.ttf")
'(4 . "Bold")
)
)

 

Can anyone help me with this issue ? 

Thanks in advance.

 

Edited by RepCad
Posted (edited)

What you could do is type in some text, formatted as you like, bold, italic, underlined whatever then use (entget (car (Entsel "Select text: "))) which will list all the dxf codes in use - should be clearer then what you can do

 

For dtext - might be wrong - but bold is defined by the font you select rather in the text, and for mtext it is a code contained within the text string rather than as part of the text definition. Dxf code 7 to change to a different font. You might have for example a font "Arial" and also "Arial_Bold"

 

 

 

 

EDIT - whoops, I'd read your question wrong and was answering the wrong thing!

Edited by Steven P
  • Like 1
Posted

See futher in the post about using different TTF fonts for bold, at least with Arial. Create the font in style dialog, then (tblsearch "style" yourstyle) to see the DXF codes. 

  • Like 1
Posted

This might be a clue:

 

(3 . "arial.ttf") (4 . "")

(3 . "arialbd.ttf") (4 . "")

 

You can get the codes for a style using this:, where 'name' is the font name (for example "STANDARD")

 

(setq style (tblobjname "style" name))
(entget style)

 

  • Like 1
Posted
19 hours ago, RepCad said:

Hello everyone,

I'm looking for the DXf code of Font style to set a style to Bold, I also set code 4 to "Bold" but it's not working

 

(entmake
(list
'(0 . "STYLE")
'(100 . "AcDbSymbolTableRecord")
'(100 . "AcDbTextStyleTableRecord")
'(2 . "C3Wall")
'(70 . 0)
'(40 . 0.0)
'(41 . 1.0)
'(50 . 0.0)
'(71 . 0)
'(42 . 0.09375)
'(3 . "Arial.ttf")
'(4 . "Bold")
)
)

 

Can anyone help me with this issue ? 

Thanks in advance.

 


Not 100%, but I think you cannot do this that way, you can't put bold on Arial.ttf. Arial and Arial bold are different fonts. So for group code 3 you have to put: '(3 . "Arial Bold.ttf")

  • Like 2

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...