Bigfont/SHP Reference?

Bigfont/SHP Reference?

Anonymous
Not applicable
313 Views
2 Replies
Message 1 of 3

Bigfont/SHP Reference?

Anonymous
Not applicable
When I was looking to learn AutoLISP, a CAD instructor recommended that I get a copy of AutoLISP in Plain English (George O. Head). This was a great reference and I was able to create a couple routines.

Now I'm looking to build an extended font. I have read here that the online help is the best reference for creating an SHP file for Bigfont use. However, I have looked through this and found it to be lacking. Is there any other reference that could help me learn to create what I'm seeking?

Thanks.
Kenny Anderson
xengineerx@xkboykoolx.com
(Remove e'x'es to reply)
0 Likes
314 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Kenny, Do you have a specific "how to" question? Basically the trick for Bigfonts is understanding how the Escape Character Byte Offset affects your shape definitions... At least it was for me. Perhaps this example will get you on your way... ; Escape Char = ` : 24576 : 60 00 ; Subshape Codes ; / - 00 2F ; 0 - 00 30 ; 1 - 00 31 ; 2 - 00 32 ; 3 - 00 33 ; 4 - 00 34 ; 5 - 00 35 ; 6 - 00 36 ; 7 - 00 37 ; 8 - 00 38 ; 9 - 00 39 *BIGFONT 50,1,060,060 *0,5,DJK-Bigfont Characters 21,7,2,21,0 *24608,5,backspace 2,8,(-21,0),0 *24609,33,eleven sixteenths 2,0A4,4,03,3,04,7,031,7,031,4,04,3,03,0AA,7,02F,06A,048,4,03,3,04, 7,031,7,036,4,04,3,03,064,0 *24610,29,two thirds 2,0A4,4,03,3,04,7,032,4,04,3,03,0AA,7,02F,06A,048,4,03,3,04, 7,033,4,04,3,03,064,0 *24611,33,thirteen sixteenths 2,0A4,4,03,3,04,7,031,7,033,4,04,3,03,0AA,7,02F,06A,048,4,03,3,04, 7,031,7,036,4,04,3,03,064,0 ;... Compare the above with the help file info and see if you can make sense of it... Notice that the line: *BIGFONT 50,1,060,060 determines what the escape character will be - in this case: ` (HEX 60 00) Which will mean, in this example, a Escape Character Byte Offset of 6*16*256 = 24576 You may wish to use a different escape character, or even more than one, depending on the number of bigfont characters you need to create. If so, you'll need to calculate the escape character byte offsets for each one, and create your shape definitions accordingly. But keep in mind that the more escape characters you make use of, (or if they are poorly chosen) the greater the risk of unexpected text display results. (Think of the chaos that would most likely ensue if you were to foolishly choose some common character, like the letter 'A', as an escape code!) WH?! THIS IS CR?Y! The lines beginning with *24### following the main header are the individual shape definitions. What determines the number is that same Escape Character Byte Offset (here 24576, remember?) + the ASCII value of the keyboard character you wish to use... so then: *24608 = 24576 + 32 (ASCII 32 = ) *24609 = 24576 + 33 (! [Shift 1]) *24610 = 24576 + 34 (") *24611 = 24576 + 35 (# [Shift 3]) Result: ` 'draws' a backspace `! draws an 11/16 fraction [Shift 1, remember?] `" draws a 2/3 fraction `# draws a 13/16 fraction [Shift 3, remember?] etc. You should be able to understand the rest of the gobbledy-gook above via the help files, but if not, feel free to post a specific question. At any rate, if you can infer from the above (in MY bigfont shape code definitions NOT posted) that typing a `7 keyboard sequence would draw a 7/16 fraction and a `@ keyboard sequence would draw a 3/4 fraction, I must say that you are well on your way to understanding whatever the hell it was I just posted. ;) hth, David Kozina PS - Excellent reference (out of print and perhaps very hard to find): "Maximizing AutoCAD R13" by Gesner, Middlebrook, and Tanzillo. PPS - Using subshapes when possible is very nice way to optimize and reduce your shape definition coding, as I hope the above also demonstrates. "kboykool" wrote in message news:25527968.1095698497500.JavaMail.jive@jiveforum1.autodesk.com... > When I was looking to learn AutoLISP, a CAD instructor recommended that I get a copy of AutoLISP in Plain English (George O. Head). This was a great reference and I was able to create a couple routines. > > Now I'm looking to build an extended font. I have read here that the online help is the best reference for creating an SHP file for Bigfont use. However, I have looked through this and found it to be lacking. Is there any other reference that could help me learn to create what I'm seeking? > > Thanks. > Kenny Anderson > xengineerx@xkboykoolx.com > (Remove e'x'es to reply)
0 Likes
Message 3 of 3

Anonymous
Not applicable
Thanks for the seemingly exhaustive response. I will have to examine this, but I think you addressed my specific questions:

How do I define an escape character (in my case the tilde~)?
How do I define the code character?
How do I define shapes? (i.e. what "shape" is a 3 or a C?)
What is the syntax? (though this appears in the help files, it's not explained very well)

Many of my special characters involve combinations of existing characters. Your fractions are one example. The centerline symbol, for another example, is an uppercase L superimposed on a lowercase c. This would obviously utilize the backspace character you defined. I also wish to define a few mathematical/geometrical symbols and a couple Greek letters. I'll look this over and post another reply should I get stuck.

Thanks again.
Kenny
0 Likes