Font Creation Help Needed

Discussion in 'AutoCAD' started by Jeff Clark, Aug 16, 2004.

  1. Jeff Clark

    Jeff Clark Guest

    I was able to uncompile the shx font file,
    find the character I want to duplicate and modify and do the modification,
    all no problem.

    I'm trying to make a BL symbol, so I copied the CL symbol I already have
    (%%150)
    and told it to use B & L instead of C & L. No sweat.

    Now I've compiled it back to SHX, but I can't find the silly symbol!

    SO....how do the %%numbers get assigned?
    how does this come out as %%150:
    *00096,13,CL
    2,5,064,7,043,6,8,(7,-6),7,04C,064,0

    how can I use the one I created:
    *00099,13,BL
    2,5,064,7,042,6,8,(7,-6),7,04C,064,0

    anybody?
     
    Jeff Clark, Aug 16, 2004
    #1
  2. The "*000hh" values are the characters codes. If they start with
    a "*" they're in hex. You can use Windows Calc to convert hex to
    dec. 99 in hex is 153 which would be the %% keyin.

    A word of caution: using values between 129 and 159 is not recommmended.
    The BL character has been defined in the new AutoCAD fonts as
    hE100 (as part of the Private Use Area).

    --
    David William Edwards

    SHXConvert - Replace SHX fonts in a DWG with component objects/Blocks
    Compile/Decompile SHX fonts without AutoCAD
    Announcing "PROJECT NEWPLEX - THE NEW STANDARD"
    FONTasm! - Truetype to Filled SHX Font/DXF File Converter
    CAD Font Services - Creation, Conversion, Customization
    http://www.tcfonts.com
     
    Dave (TC Fonts), Aug 16, 2004
    #2
  3. Jeff Clark

    GaryDF Guest

    This will help you find the character

    ;;;CHARACTR.lsp by Jeff Foster 01/17/96
    ;;;Recommended that this routine be run in a blank drawing
    ;;;This routine generates 16 columns and 16 rows of text
    ;;;consisting of each of the 256 %% characters available
    ;;;in a particular font and numbers each character.
    (Defun c:CHARACTR ()
    (setq cnt 1.0)
    (setq r_cnt 0.0)
    (setq x 0.0)
    (setq y 0.0)
    (setq sub_y (- y 0.1))
    (command "layer" "m" "textfont" "c" "4" "" "")
    (repeat 16
    (while (<= (fix cnt) (+ r_cnt 16))
    (setq pt (list x y))
    (setq sub_pt (list x sub_y))
    (command
    "text"
    "m"
    pt
    "0.05"
    "0"
    (strcat "%%" (rtos cnt 2 0))
    )
    (command "text" "m" sub_pt "0.05" "0" (rtos cnt 2 0))
    (setq x (+ x 0.2))
    (setq cnt (+ cnt 1.0))
    )
    (setq r_cnt (+ r_cnt 16))
    (setq x 0)
    (setq y (- y 0.2))
    (setq sub_y (- y 0.1))
    )
    ;;;(cdr (assoc 3 (tblsearch "STYLE" (cdr (assoc 7 (entget (car (entsel))))))))
    (setq
    fontnam (cdr
    (assoc
    3
    (tblsearch "STYLE" (cdr (assoc 7 (entget (entlast)))))
    )
    )
    )
    (name_font)
    (command "zoom" "e")
    (command "zoom" "0.95x")
    (princ)
    )
    (defun name_font ()
    (command "layer" "m" "textstyle" "c" "2" "" "")
    (setq name1 (strcat "Textstyle is \"" (getvar "textstyle") "\""))
    (setq name2 (strcat "Font is " fontnam))
    (command "text" "j" "bl" "0.0,0.33" "0.125" "0" name1 "" "")
    (command "text" "j" "bl" "0.0,0.125" "0.125" "0" name2 "" "")
    (setq name_style
    nil
    name nil
    )
    (princ)
    )
     
    GaryDF, Aug 16, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.