RepCad Posted September 20, 2023 Posted September 20, 2023 (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 September 20, 2023 by RepCad Quote
dan20047 Posted September 20, 2023 Posted September 20, 2023 See this post: http://www.cadtutor.net/forum/showthread.php?45022-How-to-Add-quot-Bold-quot-font-style-in-a-lisp&p=304553&viewfull=1#post304553 Quote
RepCad Posted September 20, 2023 Author Posted September 20, 2023 48 minutes ago, dan20047 said: See this post: http://www.cadtutor.net/forum/showthread.php?45022-How-to-Add-quot-Bold-quot-font-style-in-a-lisp&p=304553&viewfull=1#post304553 I saw it before, I mean carry it out by Entmake and DXF code. Quote
Steven P Posted September 20, 2023 Posted September 20, 2023 (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 September 20, 2023 by Steven P 1 Quote
dan20047 Posted September 20, 2023 Posted September 20, 2023 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. 1 Quote
Steven P Posted September 21, 2023 Posted September 21, 2023 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) 1 Quote
lastknownuser Posted September 21, 2023 Posted September 21, 2023 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") 2 Quote
Recommended Posts
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.