Results 1 to 5 of 5

Thread: Create font style

  1. #1
    I could stop if I wanted to cadd4la's Avatar
    Join Date
    2001-12
    Location
    Newport Beach, CA
    Posts
    399
    Login to Give a bone
    0

    Default Create font style

    Hello,

    I need some help fixing this code, it will work fine if it's a .shx font but if it's a .ttf file it can't find the file.

    Code:
    (COMMAND "STYLE" "Maven Pro Medium1_3_32" "MavenPro-Medium.ttf" "0.09375" "1.0" "" "" "" "")
    Thanks,

    Cadd4la

  2. #2
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Create font style

    Has the Maven Pro Medium font been installed? It's not part of the huge selection of fonts installed with Windows.
    Tried you code with "calibri.ttf" and it worked fine after removing the extra "" at the end.
    Code:
    (COMMAND "STYLE" "Calibri.ttf" "calibri.ttf" "0.09375" "1.0" "" "" "")
    Generally fonts installed in Windows don't use capital letters either.

  3. #3
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,105
    Login to Give a bone
    0

    Default Re: Create font style

    Have you tried the findfile function to look in the "Fonts" sub-folder of the system root folder? You can find the system root by retrieving the environment variable "SystemRoot" using the getenv function. Of course, you would need to concatenate all of those strings together using the strcat function before supplying it to the findfile function.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  4. #4
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    560
    Login to Give a bone
    0

    Default Re: Create font style

    With TTF you should load manually and check the two variables name and actual name have a look at Arial with its different styles. Arial Black = Ariblk.ttf

  5. #5
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Create font style

    Quote Originally Posted by BIG-AL View Post
    With TTF you should load manually and check the two variables name and actual name have a look at Arial with its different styles. Arial Black = Ariblk.ttf
    It may not make any difference but checking properties Arial Black = ariblk.ttf.
    All the TTF's I've checked were all lower case.

    Lee Mac's Open lisp Example to open the Fonts Special Folder:
    Code:
    (LM:open 20)
    can be a useful.
    Image for font folder https://forums.augi.com/showthread.p...=1#post1348836
    also handy for:
    Internet Explorer:
    Code:
    (LM:Open 1)
    User Start Menu Programs:
    Code:
     (LM:Open 2)
    All Control Panel Items:
    Code:
    (LM:Open 3)
    the Printers Folder:
    Code:
    (LM:Open 4)
    My Documents Folder:
    Code:
    (LM:Open 5)
    My Favorites Folder:
    Code:
    (LM:Open 6)
    or
    Code:
    (LM:Open 31)
    the Startup Folder: (LM:Open 7)
    the Recent Items Folder:
    Code:
    (LM:Open 8)
    the SendTo Folder:
    Code:
    (LM:Open 9)
    the Recycle Bin:
    Code:
    (LM:Open 10)
    User Start Menu:
    Code:
    (LM:Open 11)
    My Music:
    Code:
    (LM:Open 13)
    My Videos:
    Code:
    (LM:Open 14)
    User Desktop:
    Code:
    (LM:Open 16)
    My Computer:
    Code:
    (LM:Open 17)
    the Network Folder:
    Code:
    (LM:Open 18)
    the Network Shortcuts Folder:
    Code:
    (LM:Open 19)
    the Fonts Special Folder:
    Code:
    (LM:Open 20)
    Windows Templates:
    Code:
    (LM:Open 21)
    or
    Code:
    (LM:Open 45)
    Windows Start Menu:
    Code:
    (LM:Open 22)
    Windows Start Menu Programs:
    Code:
     (LM:Open 23)
    Windows Startup Folder:
    Code:
    (LM:Open 24)
    or
    Code:
    (LM:Open 30)
    Public Desktop:
    Code:
    (LM:Open 25
    )
    User Roaming Folder:
    Code:
     (LM:Open 26)
    Printer Shortcuts Folder:
    Code:
    (LM:Open 27)
    User AppData Local Folder:
    Code:
    (LM:Open 28)
    User Startup Folder:
    Code:
    (LM:Open 29)
    Temporary Internet Files Folder:
    Code:
    (LM:Open 32)
    Cookies Folder:
    Code:
    (LM:Open 33)
    History Folder:
    Code:
    (LM:Open 33)
    My Pictures Folder:
    Code:
     (LM:Open 33)
    though results vary depending on Windows version installed.
    Last edited by Tom Beauford; 2021-10-22 at 12:48 PM.

Similar Threads

  1. Canging TTF font in Text Style via lisp yields incorerect font.
    By jpcadconsulting347236 in forum AutoLISP
    Replies: 2
    Last Post: 2019-02-28, 06:31 PM
  2. Replies: 1
    Last Post: 2018-01-31, 02:45 PM
  3. How to create new style from existing style
    By joopaka2001115762 in forum ACA General
    Replies: 4
    Last Post: 2006-07-10, 04:16 PM
  4. Swap old custom font file for new font file
    By dgalloway in forum AutoCAD Customization
    Replies: 2
    Last Post: 2006-02-02, 03:09 PM
  5. Replies: 5
    Last Post: 2005-01-04, 07:19 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •