'Font File Doesn't Exist' ??

Discussion in 'AutoCAD' started by Matt W, Jun 4, 2004.

  1. Matt W

    Matt W Guest

    So ARIAL.TTF doesn't exist?? Sure it does. I can see it in the Text Styles
    dialog box!! But that's the message I get when I run this bit of LSP code:
    (command "-style" "TAGS1-2" "arial.ttf" "2.50" "1" "0" "n" "n")

    So far it's only happening on one PC, and not just with this font; Time New
    Roman (another TTF) also gives the same message.
    The odd part is that these fonts ARE installed and they ARE in
    C:\Windows\Fonts and they DO show up in other programs (Word, Outlook,
    Excel, etc...).

    Everyone has WIN XP Pro
     
    Matt W, Jun 4, 2004
    #1
  2. Matt W

    Walt Engle Guest

    This is what I use in my acad.lsp:
    (COMMAND "STYLE" "STANDARD" "arial.ttf" "" "" "" "" "")

    Don't think your have to have 1, 0 , n, n - just the double quotes.
     
    Walt Engle, Jun 4, 2004
    #2
  3. Matt W

    Steve Doman Guest

    Matt,

    Don't know why you are having problems because the code snip you posted
    worked fine on my WinXP Pro A2K2 workstation.

    Here is another approach that uses ActiveX. Maybe this will work?

    Code:
    (defun StyleSet (stylelist / doc name styleobj)
    ;;
    ;; Create textstyle and make it active
    ;;
    (setq doc      (vla-get-activedocument (vlax-get-acad-object))
    name     (cadar stylelist)
    styleobj (vl-catch-all-apply
    'vla-item
    (list (vla-get-textstyles doc) name)
    )
    )
    (if (vl-catch-all-error-p styleobj)
    (setq styleobj (vla-add (vla-get-textstyles doc) name))
    )
    (foreach itm (cdr stylelist)
    (vlax-put-property styleobj (car itm) (cadr itm))
    )
    (vla-put-activetextstyle doc styleobj)
    (eval styleobj) ;_ return something
    )
    
    (setq YourStyleSettings
    (list
    '(name "TAGS1-2")
    '(height 2.5)
    '(width 1.0)
    '(obliqueangle 0.0)
    '(textgenerationflag 0)
    (list 'fontfile (strcat (getenv "windir") \\fonts\\arial.ttf"))
    )
    )
    
    (StyleSet YourStyleSettings)
    
    
    Steve Doman
     
    Steve Doman, Jun 4, 2004
    #3
  4. Matt W

    andywatson Guest

    Steve,
    How did you get that formatted box with the code inside it?
     
    andywatson, Jun 4, 2004
    #4
  5. He used the code tags: [ code ] and [ /code ] (remove the spaces). It is
    only visible from the web-side, which you are obviously using.

    --
    R. Robert Bell


    Steve,
    How did you get that formatted box with the code inside it?
     
    R. Robert Bell, Jun 4, 2004
    #5
  6. Matt W

    Matt W Guest

    Well, the error message didn't pop up, but the font is still an issue.

    Although in the Text Style dialog box it says Arial.ttf, when you place
    MText or DText, it shows as Simplex. I think maybe it's a "bad font"??!?
    It is, after all, MS Windows.


    --
    Matt W

    There are 3 kinds of people:
    Those who can count, and those who can't.



    | Matt,
    |
    | Don't know why you are having problems because the code snip you posted
    | worked fine on my WinXP Pro A2K2 workstation.
    |
    | Here is another approach that uses ActiveX. Maybe this will work?
    |
    |
    Code:
    | (defun StyleSet (stylelist / doc name styleobj)
    |    ;;
    |    ;; Create textstyle and make it active
    |    ;;
    |    (setq doc      (vla-get-activedocument (vlax-get-acad-object))
    |          name     (cadar stylelist)
    |          styleobj (vl-catch-all-apply
    |                     'vla-item
    |                     (list (vla-get-textstyles doc) name)
    |                   )
    |    )
    |    (if (vl-catch-all-error-p styleobj)
    |      (setq styleobj (vla-add (vla-get-textstyles doc) name))
    |    )
    |    (foreach itm (cdr stylelist)
    |      (vlax-put-property styleobj (car itm) (cadr itm))
    |    )
    |    (vla-put-activetextstyle doc styleobj)
    |    (eval styleobj) ;_ return something
    | )
    |
    | (setq YourStyleSettings
    |    (list
    |     '(name "TAGS1-2")
    |     '(height 2.5)
    |     '(width 1.0)
    |     '(obliqueangle 0.0)
    |     '(textgenerationflag 0)
    |      (list 'fontfile (strcat (getenv "windir") \\fonts\\arial.ttf"))
    |    )
    | )
    |
    | (StyleSet YourStyleSettings)
    |
    | 
    |
    | Steve Doman
    |
    |
    |
    | Matt W wrote:
    | > So ARIAL.TTF doesn't exist?? Sure it does. I can see it in the Text
    Styles
    | > dialog box!! But that's the message I get when I run this bit of LSP
    code:
    | > (command "-style" "TAGS1-2" "arial.ttf" "2.50" "1" "0" "n" "n")
    | >
    | > So far it's only happening on one PC, and not just with this font; Time
    New
    | > Roman (another TTF) also gives the same message.
    | > The odd part is that these fonts ARE installed and they ARE in
    | > C:\Windows\Fonts and they DO show up in other programs (Word, Outlook,
    | > Excel, etc...).
    | >
    | > Everyone has WIN XP Pro
    | >
     
    Matt W, Jun 7, 2004
    #6
  7. This font availability issue is one of the reasons I try to use only fonts
    that COME WITH AutoCAD whenever possible, especially if I'm likely to be
    sending a drawing to anyone else. The SWISS family of fonts that come with
    AutoCAD emulate Helvetica (after all, "Helvetica" is just the Latin word for
    "Swiss"), and are nearly indistinguishable from Arial except for a small
    number of characters with noticeable differences to the
    graphically-conscious eye (like the capital R), but most people wouldn't
    notice. If AutoCAD can't find one of its own fonts, then we're really in
    trouble.

    Kent Cooper, AIA

    [And for those who like little tag-line quips:
    There are 10 kinds of people in the world: those who understand binary, and
    those who don't.]


    ...
     
    Kent Cooper, AIA, Jun 7, 2004
    #7
  8. Matt W

    Steve Doman Guest

    Matt,

    Sorry that you are still having problems with this. But I think you may
    be right that it could be a Windows issue. Perhaps the Arial font
    needs to be re-installed? Although it does seems odd that a standard
    font like Arial would be installed incorrectly since it's part of the
    Windows Install.

    Steve Doman
     
    Steve Doman, Jun 8, 2004
    #8
  9. Matt W

    Steve Doman Guest

    Some more thoughts...

    If AutoCAD is displaying Simplex when the style font property is Arial,
    then AutoCAD may be substituting the Arial font with the font indicated
    in the sysvar Fontalt. This happens as you probably already know,
    whenever the font required is unavailable on that particular
    workstation. You might try changing the value of Fontalt to some
    other font like Txt.shx and do a regen. If the text object in question
    changes to Txt.shx, then I would say that Arial is available (to AutoCAD
    anyway).

    Another possibility is that the Arial font may be mapped to another font
    via the ACAD.FMP file. Check the sysvar Fontmap for the location of
    this file and open it. See if Arial is listed inside this file and
    delete that entry if you find it.

    Steve
     
    Steve Doman, Jun 8, 2004
    #9
  10. Matt W

    Steve Doman Guest

    Opps, missed a word in the verbage below:
    Should say:

    ....that Arial is *NOT* available..
     
    Steve Doman, Jun 8, 2004
    #10
  11. Matt W

    Matt W Guest

    If this were the case, then it would be happening to everyone because I've
    got ACAD set up to look at the ACAD.FMP file on a network.
    I'm going to have the IT geeks re-install the Arial font.

    I'll keep you posted as to what I find out.

    Thanks for the help!

    --
    Matt W

    There are 3 kinds of people:
    Those who can count, and those who can't.



    |
    | Some more thoughts...
    |
    | If AutoCAD is displaying Simplex when the style font property is Arial,
    | then AutoCAD may be substituting the Arial font with the font indicated
    | in the sysvar Fontalt. This happens as you probably already know,
    | whenever the font required is unavailable on that particular
    | workstation. You might try changing the value of Fontalt to some
    | other font like Txt.shx and do a regen. If the text object in question
    | changes to Txt.shx, then I would say that Arial is available (to AutoCAD
    | anyway).
    |
    | Another possibility is that the Arial font may be mapped to another font
    | via the ACAD.FMP file. Check the sysvar Fontmap for the location of
    | this file and open it. See if Arial is listed inside this file and
    | delete that entry if you find it.
    |
    | Steve
     
    Matt W, Jun 8, 2004
    #11
  12. Matt W

    Matt W Guest

    Well, it turns out it was a couple of "bad" fonts.
    We re-installed Arial.ttf and Arialbd.ttf and everything works fine now.

    The only puzzling part of this is, how was the font corrupted or changed
    when no one has access to their C: drive?? Oh, it exists, it's just not
    visible to the naked eye.


    --
    Matt W

    There are 3 kinds of people:
    Those who can count, and those who can't.



    | If this were the case, then it would be happening to everyone because I've
    | got ACAD set up to look at the ACAD.FMP file on a network.
    | I'm going to have the IT geeks re-install the Arial font.
    |
    | I'll keep you posted as to what I find out.
    |
    | Thanks for the help!
    |
    | --
    | Matt W
    |
    | There are 3 kinds of people:
    | Those who can count, and those who can't.
    |
    |
    |
    | | |
    | | Some more thoughts...
    | |
    | | If AutoCAD is displaying Simplex when the style font property is Arial,
    | | then AutoCAD may be substituting the Arial font with the font indicated
    | | in the sysvar Fontalt. This happens as you probably already know,
    | | whenever the font required is unavailable on that particular
    | | workstation. You might try changing the value of Fontalt to some
    | | other font like Txt.shx and do a regen. If the text object in question
    | | changes to Txt.shx, then I would say that Arial is available (to AutoCAD
    | | anyway).
    | |
    | | Another possibility is that the Arial font may be mapped to another font
    | | via the ACAD.FMP file. Check the sysvar Fontmap for the location of
    | | this file and open it. See if Arial is listed inside this file and
    | | delete that entry if you find it.
    | |
    | | Steve
    |
    |
     
    Matt W, Jun 8, 2004
    #12
  13. Matt W

    Steve Doman Guest

    aha! So it was a bad font. Yes it is puzzling too. Maybe a poorly
    written application hosed the font. Or maybe a user did something weird.

    Cheers,
    Steve Doman
     
    Steve Doman, Jun 9, 2004
    #13
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.