我想检索已安装字体的信息,我尝试过这种方式:
Private Function Get_Installed_Fonts() As Array
Dim AllFonts As New Drawing.Text.InstalledFontCollection ' Get the installed fonts collection.
Dim FontFamilies() As FontFamily = AllFonts.Families() ' Get an array of the system's font familiies.
Return FontFamilies ' Return the array
End Function
然后我可以做...:
For Each Font As FontFamily In Get_Installed_Fonts()
MsgBox(Font.Name)
Next
但我找不到这样做的方法:
For Each Font As FontFamily In Get_Installed_Fonts()
MsgBox(Font.IsSystemFont)
MsgBox(Font.OriginalFontName)
MsgBox(Font.SizeInPoints)
Next
我在那里缺少什么?
这就是我将获得的东西,我还需要一种方法来搜索是否安装了字体,例如:
If FontsArray.contains("FontName") Then...