How can I get a list of the available NSFont families?

前端 未结 6 1600
故里飘歌
故里飘歌 2021-02-05 10:15

How can I get a list of the available NSFont families, preferably with the fontName: equivalents.

6条回答
  •  终归单人心
    2021-02-05 10:41

    [[NSFontManager sharedFontManager] availableFontFamilies]
    

    (previously, I had written -[NSFontManager availableFontFamilies], which is a conventional way of writing a method name, but could be confusing if interpreted as sample code.)

提交回复
热议问题