インストールされているフォントの情報を取得したいので、次の方法で試しました:
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...