Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Changing Font Using Lisp

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
2037 Views, 7 Replies

Changing Font Using Lisp

Hi 🙂 , In middle east countries we are using irregular font called xarb.shx

this font can not be converted from Arial to Xarb or opposite directly

What i found there is translation like  "f" is ب  "a" is ش and so on  

i am ready to do dictionary of translation letter inside lisp to match every letter with equal language.

but i want a routine that First ,change font language from arabic to english as first step during Arial style

then Second ,altering letters from arabic to english keyboard

"ا" is "h"

"ل "is "g" 

"ع" is "u" 

"ر" is "v"

"ب " is "f" 

"ي" is "d"

"ة" is "m"

 

"ئ" is "z"

"ء" is "x"

"ؤ" is "c"

"لا" is "b"

"ى" is "n"

"ة" is "m"

"و" is ","

"ط" is " ' "

"ظ" is "/"

"ز" is shift keyboard +"."

"ت" is "j"

"م" is "l"

"ك" is ":"

"s" is "س"

"a" is "ش"

"q" is "ض"

"w" is "ص"

"e" is "ض"

"r" is "ق"

"t" is "ف"

"y" is "غ"

"i" is "ه"

"o" is "خ" 

"p" is "ح"

"ج" is "{"

"د" is "}"

then Third ,changing font style from Arial to xarb

 

Please this will save us a lot of tedious time in the office i am working on sometime the office is re type the whole paragraph of 100 lines to match the Arial but in xarb font.

 

 

7 REPLIES 7
Message 2 of 8
3wood
in reply to: Anonymous

Can you upload the xarb.shx file? Are there western alphabets in this shx? If not, you have to use other font to shown western letters. 

Message 3 of 8
Anonymous
in reply to: 3wood

i do not know if there is western alphabets usually they are using it only for arabic(eastern) letter but here is  xarb.shx file in attachment.

 

Message 4 of 8
3wood
in reply to: Anonymous

I have tried use vl-string-translate but for unkown reason, a few letters are not translated successfully.

Alternatively, you can combine all single lines texts into a Mtext, copy the content to MS Word, then set up a macro to replace characters. In worst case, if you don't know how to set up macro in MS Word, just use Find and Replace letters one by one, either in MS Word or in AutoCAD.

 

Message 5 of 8
pendean
in reply to: Anonymous

Is there any software that will translate from English to Arabic, that you own (outside of AutoCAD)? Auto-translation is a world-wide dream/wishlist, but your unique problem seems to be related to the fact that the SHX font is not mapped the way you want to use it.

For those who can't read your post, the e translates to a heavy-D, an r translated to a heavy-T, a t translates to an F, a y translates to a heavy-KH, a p translates to a heavy-H and so on. A complete and total mess.

My suggestion, if you actually own a software that auto-translates between the two languages, is to copy/paste from AutoCAD to it, translate, then back again into an MTEXT preset to use your desired language/font.

Good luck, AFAIK your process still requires humans to manaully translate or proof-read and correct anyway.
Message 6 of 8
Anonymous
in reply to: 3wood

In response to 

Second, if   there are a few letters are not translated successfully that is mean that other letters are successful 

if you could provide me the code please ?

 

Message 7 of 8
Anonymous
in reply to: Anonymous

Regarding Find& Replace 

Why not using it inside autocad using lisp ?

by making list of find and replace letters 

and then changing style i just need example code of listing character and changing style.

 

Message 8 of 8
Anonymous
in reply to: Anonymous

i have the same problem... i want to covert xarab to arial.. there are many room names ... any help to modify to arial??

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost