Jump to content

Is it possible to modify a SHX font's character map?


bababarghi

Recommended Posts

I hope I have created this thread at the right place :unsure:

 

 

Folks,

 

I use ISOCP.SHX in my Single Line texts a lot. And one of the most frequently used characters in our drawing office is the symbol for meter square, m². Is there any possibility that I could modify ISOCP.SHX 's map and assign '%%178' keystroke to a specific key e.g. tilde (~)? :geek:

 

In other words I want to be able to have %%178 whenever I press ~ key on my keyboard.

Link to comment
Share on other sites

Yes, but do be careful as you will have the only version of the altered ISOCP.SHX in the world, and if you send the drawing file to anyone, they will not be able to see the custom character that you have created.

 

But to details. Find the ISOCP.SHX file, and using DUMPSHX from Express tools, you can create the ISOCP.SHP file. This is now visible in any text editor. You can make the required alterations, and re-compile it to give a truly unique text file.

Link to comment
Share on other sites

Since ISOCP.SHX already has a tilde, you would only have to redefine that character. Then everyone else who did not have your text file would see a tilde. You could put in the notes, that a tilde represented " m² "

Link to comment
Share on other sites

Thanks eldon. That sounds too scary. Doesn't it?!

 

So what's the workaround if I want to make my life easier for typing metre square character in single line texts?

 

Re-mapping the key was the only solution which came to my mind solely because I couldn't think about anything else:/

Link to comment
Share on other sites

Try key remapping you can download a free program you pick a key then add what you want it to be, I had a broken 9( and remaped ~ to be (. The other way is to maybe remap one of the function keys form within Autocad via the CUI.

Link to comment
Share on other sites

Re-mapping a key in Windows is perhaps not a good idea as well since it will globally map a new function for ~ in all of my Windows programs. :huh:

Link to comment
Share on other sites

Since a superscript 2 is part of the ISOCP.SHX font you do not need to modify the font. I think the goal is to assign the ASCII code 0178 to a key that can be used while in the text editor. I do not know how to do that but here's a partial solution.

 

Create a custom toolbar button that adds an m and the 2 superscript. Define the macro as shown in the screenshot below. IMPORTANT, to enter the superscript 2 hold down the ALT key and type 0178 from the NUMBER PAD (not from the numbers along the top of the keyboard). Clicking this button will add an m with a superscript 2 which you can edit with the value you want. You can use one of the stock images for the button or create your own like I did.

 

m-squared.JPG

 

Of course, you can just enter m Alt 0178 when you are entering text.

 

~lrm

Link to comment
Share on other sites

Thanks Irm. That will do. However, I prefer to be able use this custom button while TEXT command is active i.e. I need a macro to let me put m² inside current active text line which I am typing.

 

Above given solution doesn't work in that way. It will add 'm²' when no TEXT command is active. Do you think that would be achievable via MACROs? :unsure:

Link to comment
Share on other sites

You may be able to do a lisp that reads the characters so when you type asdf123m~isok it turns the ~ into the superscript then actually draws the text. It can be used then in two ways convert existing or make new.

 

Anyone, Lee any idea how for ²

Link to comment
Share on other sites

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...