找回密码
 加入
搜索
查看: 1378|回复: 1

[系统综合] 【已解决】字体列表缺失某些字体的疑问

[复制链接]
发表于 2016-12-21 08:07:19 | 显示全部楼层 |阅读模式
本帖最后由 chishingchan 于 2023-10-25 19:27 编辑

脚本本意:列出亚洲国家字体
以下脚本运行后没有显示“黑体”,不知道那个语句用的不当!请指点,谢谢!
#include <WinAPIEx.au3>
Local $s
$fso = ObjCreate("Scripting.FileSystemObject")
$f = $fso.GetFolder(_WinAPI_ShellGetSpecialFolderPath($CSIDL_FONTS))
$fc = $f.Files
For $f1 In $fc
        If StringInStr($f1.name, ".tt") And Not StringIsAlNum(StringStripWS(_WinAPI_GetFontResourceInfo($f1.name, 1), 8)) Then $s &= _WinAPI_GetFontResourceInfo($f1.name, 1) & @CRLF
Next
MsgBox(0,"",$s)
答案在 2#
 楼主| 发表于 2016-12-21 08:14:33 | 显示全部楼层
本帖最后由 chishingchan 于 2023-10-25 19:25 编辑
#include <WinAPIEx.au3>        ;_FontsList()

Func _FontsList()
        Local $FontsList
        Local $FSO = ObjCreate("Scripting.FileSystemObject")
        Local $Fonts = $FSO.GetFolder(@WindowsDir & "\Fonts")
        For $Font In $Fonts.Files
                If $FSO.GetExtensionName($Font.name) = "ttc" Or $FSO.GetExtensionName($Font.name) = "ttf" Then
                        $FontsList = $FontsList & _WinAPI_GetFontResourceInfo($Font.name, 1) & "|"
                EndIf
        Next
        If StringInStr($FontsList, " & ") Then $FontsList = StringReplace($FontsList, " & ", "|")
        Return $FontsList
EndFunc        ;字体列表
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-4-26 05:08 , Processed in 0.073091 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表