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

前端 未结 6 1586
故里飘歌
故里飘歌 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:36

    Swift 5

    for family in NSFontManager.shared.availableFontFamilies {
        print(family)
    }
    

提交回复
热议问题