Get font name of system font

With

[code]Public Function getAppearanceFont(doSmall as Boolean) as String

dim FontSize as Double
if doSmall then
FontSize = NSFontMBS.smallSystemFontSize
else
FontSize = NSFontMBS.systemFontSize
end if
dim theFont as NSFontMBS = NSFontMBS.systemFontOfSize(FontSize)
dim FontName as String = theFont.displayName
Return FontName

End Function[/code]

I get the “systemfont normal” as result. How do I now get the actual name out of this? I need to change fonts in CSS/Html, which doesn’t know anything about a systemfont but needs a concrete name.

Search the forum. This is a recurring question.

I am not sure this is a good idea, though. Second guessing the system font is dicy, since these fonts are often not directly listable.

Either you trust the system font, or you assign your own font. It is quite alright to have your own font in an app, so you are sure it will display the same no matter the version of the system.