View Full Version : Create font style
cadd4la
2021-10-17, 06:13 AM
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.
(COMMAND "STYLE" "Maven Pro Medium1_3_32" "MavenPro-Medium.ttf" "0.09375" "1.0" "" "" "" "")
Thanks,
Cadd4la
Tom Beauford
2021-10-17, 02:19 PM
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.
(COMMAND "STYLE" "Calibri.ttf" "calibri.ttf" "0.09375" "1.0" "" "" "")
Generally fonts installed in Windows don't use capital letters either.
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.
BIG-AL
2021-10-21, 11:15 PM
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
Tom Beauford
2021-10-22, 12:41 PM
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 (http://www.lee-mac.com/open.html) lisp Example to open the Fonts Special Folder:
(LM:open 20) can be a useful.
Image for font folder https://forums.augi.com/showthread.php?170167-ASCII&p=1348836&viewfull=1#post1348836
also handy for:
Internet Explorer:
(LM:Open 1)
User Start Menu Programs:
(LM:Open 2)
All Control Panel Items:
(LM:Open 3)
the Printers Folder:
(LM:Open 4)
My Documents Folder:
(LM:Open 5)
My Favorites Folder:
(LM:Open 6) or
(LM:Open 31)
the Startup Folder: (LM:Open 7)
the Recent Items Folder:
(LM:Open 8)
the SendTo Folder:
(LM:Open 9)
the Recycle Bin:
(LM:Open 10)
User Start Menu:
(LM:Open 11)
My Music:
(LM:Open 13)
My Videos:
(LM:Open 14)
User Desktop:
(LM:Open 16)
My Computer:
(LM:Open 17)
the Network Folder:
(LM:Open 18)
the Network Shortcuts Folder:
(LM:Open 19)
the Fonts Special Folder:
(LM:Open 20)
Windows Templates:
(LM:Open 21) or
(LM:Open 45)
Windows Start Menu:
(LM:Open 22)
Windows Start Menu Programs:
(LM:Open 23)
Windows Startup Folder:
(LM:Open 24) or
(LM:Open 30)
Public Desktop:
(LM:Open 25)
User Roaming Folder:
(LM:Open 26)
Printer Shortcuts Folder:
(LM:Open 27)
User AppData Local Folder:
(LM:Open 28)
User Startup Folder:
(LM:Open 29)
Temporary Internet Files Folder:
(LM:Open 32)
Cookies Folder:
(LM:Open 33)
History Folder:
(LM:Open 33)
My Pictures Folder:
(LM:Open 33)
though results vary depending on Windows version installed.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.