<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic HOW to replace all TTF fonts to SHX in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9894519#M67105</link>
    <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me with a lisp that selects all the fonts in the drawing and replace it to specify SHX fonts.&lt;/P&gt;&lt;P&gt;I mean- I want by calling the lisp:&lt;/P&gt;&lt;P&gt;1. it will ask to select an area or all if an area is selected it allow to select a region to replace only these fonts or all the fonts.&lt;/P&gt;&lt;P&gt;2. it will give a list of the shx fonts style that I have in that drawing, and after selecting one font, it will replace the TTF fonts that have been selected in no.1 to that font.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eyal&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2020 11:57:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-25T11:57:05Z</dc:date>
    <item>
      <title>HOW to replace all TTF fonts to SHX</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9894519#M67105</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me with a lisp that selects all the fonts in the drawing and replace it to specify SHX fonts.&lt;/P&gt;&lt;P&gt;I mean- I want by calling the lisp:&lt;/P&gt;&lt;P&gt;1. it will ask to select an area or all if an area is selected it allow to select a region to replace only these fonts or all the fonts.&lt;/P&gt;&lt;P&gt;2. it will give a list of the shx fonts style that I have in that drawing, and after selecting one font, it will replace the TTF fonts that have been selected in no.1 to that font.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eyal&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 11:57:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9894519#M67105</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T11:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: HOW to replace all TTF fonts to SHX</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9896681#M67106</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I replace TTF fonts with SHX fonts by lisp?&lt;/P&gt;&lt;P&gt;If you have something similar to do this task will be great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good day&lt;/P&gt;&lt;P&gt;Eyal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 09:09:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9896681#M67106</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-26T09:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: HOW to replace all TTF fonts to SHX</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9896995#M67107</link>
      <description>&lt;P&gt;Your request is not so simple to answer.&lt;/P&gt;&lt;P&gt;Text formatting regarding a font is done using font styles. With MTEXT entities, and other entities that incorporate MTEXT to present text, there is possible override of a font stile.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For mtext that uses predefined font stile text information looks like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;....(1 . "Teste text") (7 . "Standard").....&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For mtext with overridden formatting this information looks like this (used txt.shx)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(1 . "{\\Ftxt|c238;Test text}") (7 . "Standard")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; or here with TTF font&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(1 . "{\\fVerdana|b1|i1|c238|p34;\\LTest text}") (7 . "Standard")&lt;/LI-CODE&gt;&lt;P&gt;&lt;A href="https://www.cadforum.cz/cadforum_en/text-formatting-codes-in-mtext-objects-tip8640" target="_self"&gt;Here&lt;/A&gt; you can find explanation for MTEXT formating codes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Changing mtext formating is not so simple since formatinga are not saved separately, but are coded together with&lt;/P&gt;&lt;P&gt;text information. One would have to read out text information from MTEXT entity and recode it back with new font.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For changing MTEXT object, one option is&amp;nbsp; to define various font styles, explode them, assign new styles and if needed convert back to MTEXT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Read &lt;A href="https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/Text-in-Mtext-do-not-follow-the-text-style-s-font-change.html" target="_self"&gt;this&lt;/A&gt; post for your possible further steps&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 11:54:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9896995#M67107</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2020-11-26T11:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: HOW to replace all TTF fonts to SHX</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9897152#M67108</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your explanation, is it possible to replace only the SHX style with another SHX style by a lisp?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eyal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 13:00:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9897152#M67108</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-26T13:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: HOW to replace all TTF fonts to SHX</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9897389#M67109</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for your explanation, is it possible to replace only the SHX style with another SHX style by a lisp?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Well, there are text objects inside drawing. If we would change style names then each text objects style would have to be changed to new style. What can be done is to change font of particular existing text stile with new one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or you can create new style definitions and replace occurrences of old style in existing text objects.&lt;/P&gt;&lt;P&gt;If you have in your drawing MTEXT objects that don't have changed formatting, changing style will affect them too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Provide more details, some sample drawing.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 14:58:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9897389#M67109</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2020-11-26T14:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: HOW to replace all TTF fonts to SHX</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9897842#M67110</link>
      <description>&lt;P&gt;Based on the name of this thread this should do what you want:&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c:foo ( / d)
  (vlax-for f (vla-get-textstyles (setq d (vla-get-activedocument (vlax-get-acad-object))))
    (if	(wcmatch (strcase (vla-get-fontfile f)) "*.TTF")
      (vl-catch-all-apply 'vla-put-fontfile (list f "Romans.shx"))
    )
  )
  (vla-Regen d acAllViewports)
  (princ)
)
(vl-load-com)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 26 Nov 2020 18:44:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9897842#M67110</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2020-11-26T18:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: HOW to replace all TTF fonts to SHX</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9898432#M67111</link>
      <description>&lt;P&gt;First question is why would you want to do that?&amp;nbsp; I hope you don't think that the old HB.SHX font is better than ArialB.ttf, because it isn't.&amp;nbsp; The ttf fonts are rock solid, while the shx fonts contain just a lot of pen strokes for fill thus making them vulnerable to the pen width of their color.&lt;/P&gt;
&lt;P&gt;The second thing that bothers me is that except for mtext overrides, the font is dependent on the text style definition, so you wouldn't be able to change the font of only selected text entities.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 02:38:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9898432#M67111</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2020-11-27T02:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: HOW to replace all TTF fonts to SHX</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9901092#M67112</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp; hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Converting a text in hebrew ttf to shx&amp;nbsp; does not just involves changing the text style\font file, it requires a character conversion between unicode to 8bit cause that still what most of us using here (to my sorrow).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WINHEB has a command (from Revit to AutoCAD) to do this conversion. if you do not have that, then this issue is a real pain&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Nov 2020 16:19:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9901092#M67112</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2020-11-28T16:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: HOW to replace all TTF fonts to SHX</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9903411#M67113</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And if I want to change the SHX font style to another SHX font style?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some SHX fonts in the drawing and I want by calling the lisp to give a list of all the SHX fonts in the current drawing and after selecting one style it will change all the SHX fonts in the drawing to that font style.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could it be made?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, and good day&lt;/P&gt;&lt;P&gt;Eyal&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 07:17:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9903411#M67113</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-30T07:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: HOW to replace all TTF fonts to SHX</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9903466#M67114</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For that you do not need any lisp only select the texts and select the style to change from properties palette (style combo box) and bare in mind...in our contry we have 3 types of shx fonts:&lt;/P&gt;&lt;P&gt;1. unicode shx&lt;/P&gt;&lt;P&gt;2. 8bit shx&lt;/P&gt;&lt;P&gt;3. 7bit shx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;changing from one to another won't go&amp;nbsp;only changing style on the same type.&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 07:53:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-all-ttf-fonts-to-shx/m-p/9903466#M67114</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2020-11-30T07:53:48Z</dc:date>
    </item>
  </channel>
</rss>

