打印字体

func showAllFonts()
{
    let familyNames = UIFont.familyNames
    
    var index:Int = 0
    
    for familyName in familyNames
    {
        let fontNames = UIFont.fontNames(forFamilyName: familyName as String)
        for fontName in fontNames
        {
            index += 1
            
            print("第 \(index) 个字体,字体font名称:\(fontName)")
        }
    }
}

你可能感兴趣的:(打印字体)