Created
June 23, 2017 07:47
-
-
Save hirohitokato/d3a19dc597469e1ce1e658c76226bdc2 to your computer and use it in GitHub Desktop.
ダウンロードフォントの管理クラス
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// DLFonts.swift | |
// | |
// Created by Hirohito Kato on 2017/04/21. | |
// Copyright © 2017 Hirohito Kato. All rights reserved. | |
// | |
// | |
// FontDownloader.swift | |
// FontDownloader | |
// | |
// Created by Takeru Chuganji on 9/26/15. | |
// Copyright © 2015 Takeru Chuganji. All rights reserved. | |
// | |
import UIKit | |
import CoreText | |
fileprivate let UndefinedFontSize = CGFloat(1) | |
public let FontDidBecomeAvailableNotification = Notification.Name(rawValue: "com.hoppenichu.FontDownloader.FontDidBecomeAvailableNotification") | |
public let FontNameInfoKey = "fontName" | |
public extension UIFont { | |
public typealias DownloadProgressHandler = (_ downloadedSize: Int, _ totalSize: Int, _ percentage: Int) -> Void | |
public typealias DownloadCompletionHandler = (_ font: UIFont?) -> Void | |
public class func downloadableFontNames() -> [String] { | |
let downloadableDescriptor = CTFontDescriptorCreateWithAttributes([ | |
(kCTFontDownloadableAttribute as String): kCFBooleanTrue | |
] as CFDictionary) | |
guard let cfMatchedDescriptors = CTFontDescriptorCreateMatchingFontDescriptors(downloadableDescriptor, nil), | |
let matchedDescriptors = (cfMatchedDescriptors as NSArray) as? [CTFontDescriptor] else { | |
return [] | |
} | |
return matchedDescriptors.flatMap { (descriptor) -> String? in | |
let attributes = CTFontDescriptorCopyAttributes(descriptor) as NSDictionary | |
return attributes[kCTFontNameAttribute as String] as? String | |
} | |
} | |
public class func fontExists(name: String) -> Bool { | |
return UIFont(name: name, size: UndefinedFontSize) != nil | |
} | |
public class func preloadFont(name: String) { | |
if fontExists(name: name) { | |
return | |
} | |
downloadFont(name: name, size: UndefinedFontSize) | |
} | |
public class func downloadFont(name: String, size: CGFloat, progress: DownloadProgressHandler? = nil, completion: DownloadCompletionHandler? = nil) { | |
let wrappedProgressHandler = { (param: NSDictionary) -> Void in | |
DispatchQueue.main.async { () -> Void in | |
let downloadedSize = param[kCTFontDescriptorMatchingTotalDownloadedSize as String] as? Int ?? 0 | |
let totalSize = param[kCTFontDescriptorMatchingTotalAssetSize as String] as? Int ?? 0 | |
let percentage = param[kCTFontDescriptorMatchingPercentage as String] as? Int ?? 0 | |
progress?(downloadedSize, totalSize, percentage) | |
} | |
} | |
let wrappedCompletionHandler = { (postNotification: Bool) -> Void in | |
DispatchQueue.main.async { () -> Void in | |
let font = UIFont(name: name, size: size) | |
if postNotification && font != nil { | |
NotificationCenter.default.post(name: FontDidBecomeAvailableNotification, | |
object: nil, userInfo: [ | |
FontNameInfoKey: name | |
]) | |
} | |
completion?(font) | |
} | |
} | |
if fontExists(name: name) { | |
wrappedCompletionHandler(false) | |
return | |
} | |
let cfName = name as CFString | |
let cfDescriptors = [ CTFontDescriptorCreateWithNameAndSize(cfName, size) ] as CFArray | |
CTFontDescriptorMatchFontDescriptorsWithProgressHandler(cfDescriptors, nil) | |
{ (state, param) -> Bool in | |
switch state { | |
case .willBeginDownloading, .stalled, .downloading, .didFinishDownloading: | |
wrappedProgressHandler(param) | |
case .didFinish: | |
wrappedCompletionHandler(true) | |
default: | |
break | |
} | |
return true | |
} | |
} | |
} | |
extension UIView { | |
func beMaruGothic() { | |
func getSubviews<T>(ofView view:UIView) -> [T] { | |
var targets = [T]() | |
if view is T { | |
targets.append(view as! T) | |
} | |
for subview in view.subviews { | |
targets += getSubviews(ofView: subview) | |
if subview is T { | |
targets.append(subview as! T) | |
} | |
} | |
return targets | |
} | |
let views: [FontSettable] = getSubviews(ofView: self) | |
views.forEach { $0.setFont(.HiraMaruProN_W4) } | |
} | |
} | |
protocol FontSettable { | |
func setFont(_ name: Fonts) | |
} | |
extension UILabel: FontSettable { | |
func setFont(_ name: Fonts) { | |
self.font = UIFont(name: name.rawValue, size:self.font.pointSize) | |
print("\(font!)") | |
} | |
} | |
extension UIButton: FontSettable { | |
func setFont(_ name: Fonts) { | |
guard let titleLabel = titleLabel else { | |
return | |
} | |
titleLabel.font = UIFont(name: name.rawValue, | |
size:titleLabel.font.pointSize) | |
} | |
} | |
public enum Fonts: String { | |
case Zawra_Heavy = "Zawra-Heavy" | |
case Zawra_Bold = "Zawra-Bold" | |
case YuppyTC_Regular = "YuppyTC-Regular" | |
case YuppySC_Regular = "YuppySC-Regular" | |
case YuMin_36pKn_Extrabold = "YuMin_36pKn-Extrabold" | |
case YuMin_36pKn_Demibold = "YuMin_36pKn-Demibold" | |
case YuMin_36pKn_Medium = "YuMin_36pKn-Medium" | |
case YuMin_Extrabold = "YuMin-Extrabold" | |
case YuMin_Demibold = "YuMin-Demibold" | |
case YuMin_Medium = "YuMin-Medium" | |
case YuKyo_Bold = "YuKyo-Bold" | |
case YuKyo_Medium = "YuKyo-Medium" | |
case YuKyo_Yoko_Bold = "YuKyo_Yoko-Bold" | |
case YuKyo_Yoko_Medium = "YuKyo_Yoko-Medium" | |
case YuGo_Medium = "YuGo-Medium" | |
case YuGo_Bold = "YuGo-Bold" | |
case Yaziji = "Yaziji" | |
case Wingdings3 = "Wingdings3" | |
case Wingdings2 = "Wingdings2" | |
case Wingdings_Regular = "Wingdings-Regular" | |
case Weibei_TC_Bold = "Weibei-TC-Bold" | |
case Weibei_SC_Bold = "Weibei-SC-Bold" | |
case Webdings = "Webdings" | |
case WaseemLight = "WaseemLight" | |
case Waseem = "Waseem" | |
case TypeEmbellishmentsOneLetPlain = "TypeEmbellishmentsOneLetPlain" | |
case TwCenMT_BoldItalic = "TwCenMT-BoldItalic" | |
case TwCenMT_Italic = "TwCenMT-Italic" | |
case TwCenMT_Bold = "TwCenMT-Bold" | |
case TwCenMT_Regular = "TwCenMT-Regular" | |
case TsukuBRdGothic_Bold = "TsukuBRdGothic-Bold" | |
case TsukuBRdGothic_Regular = "TsukuBRdGothic-Regular" | |
case TsukuARdGothic_Bold = "TsukuARdGothic-Bold" | |
case TsukuARdGothic_Regular = "TsukuARdGothic-Regular" | |
case Trattatello = "Trattatello" | |
case ToppanBunkyuMinchoPr6N_Regular = "ToppanBunkyuMinchoPr6N-Regular" | |
case ToppanBunkyuMidashiMinchoStdN_ExtraBold = "ToppanBunkyuMidashiMinchoStdN-ExtraBold" | |
case ToppanBunkyuMidashiGothicStdN_ExtraBold = "ToppanBunkyuMidashiGothicStdN-ExtraBold" | |
case ToppanBunkyuGothicPr6N_Regular = "ToppanBunkyuGothicPr6N-Regular" | |
case ToppanBunkyuGothicPr6N_DB = "ToppanBunkyuGothicPr6N-DB" | |
case Times_BoldItalic = "Times-BoldItalic" | |
case Times_Italic = "Times-Italic" | |
case Times_Bold = "Times-Bold" | |
case Times_Roman = "Times-Roman" | |
case TeluguSangamMN_Bold = "TeluguSangamMN-Bold" | |
case TeluguSangamMN = "TeluguSangamMN" | |
case TeluguMN_Bold = "TeluguMN-Bold" | |
case TeluguMN = "TeluguMN" | |
case TamilSangamMN_Bold = "TamilSangamMN-Bold" | |
case TamilSangamMN = "TamilSangamMN" | |
case TamilMN_Bold = "TamilMN-Bold" | |
case TamilMN = "TamilMN" | |
case Tahoma_Bold = "Tahoma-Bold" | |
case Tahoma = "Tahoma" | |
case SynchroLET = "SynchroLET" | |
case SukhumvitSet_Bold = "SukhumvitSet-Bold" | |
case SukhumvitSet_SemiBold = "SukhumvitSet-SemiBold" | |
case SukhumvitSet_Medium = "SukhumvitSet-Medium" | |
case SukhumvitSet_Text = "SukhumvitSet-Text" | |
case SukhumvitSet_Light = "SukhumvitSet-Light" | |
case SukhumvitSet_Thin = "SukhumvitSet-Thin" | |
case STYuanti_TC_Light = "STYuanti-TC-Light" | |
case STYuanti_SC_Light = "STYuanti-SC-Light" | |
case STYuanti_TC_Bold = "STYuanti-TC-Bold" | |
case STYuanti_SC_Bold = "STYuanti-SC-Bold" | |
case STYuanti_TC_Regular = "STYuanti-TC-Regular" | |
case STYuanti_SC_Regular = "STYuanti-SC-Regular" | |
case STXingkaiTC_Light = "STXingkaiTC-Light" | |
case STXingkaiSC_Light = "STXingkaiSC-Light" | |
case STXingkaiTC_Bold = "STXingkaiTC-Bold" | |
case STXingkaiSC_Bold = "STXingkaiSC-Bold" | |
case STXihei = "STXihei" | |
case STSongti_TC_Regular = "STSongti-TC-Regular" | |
case STSongti_SC_Regular = "STSongti-SC-Regular" | |
case STSongti_TC_Light = "STSongti-TC-Light" | |
case STSong = "STSong" | |
case STSongti_SC_Light = "STSongti-SC-Light" | |
case STSongti_TC_Bold = "STSongti-TC-Bold" | |
case STSongti_SC_Bold = "STSongti-SC-Bold" | |
case STSongti_SC_Black = "STSongti-SC-Black" | |
case StoneSansITCTT_Bold = "StoneSansITCTT-Bold" | |
case StoneSansITCTT_SemiIta = "StoneSansITCTT-SemiIta" | |
case StoneSansITCTT_Semi = "StoneSansITCTT-Semi" | |
case STLibianTC_Regular = "STLibianTC-Regular" | |
case STLibianSC_Regular = "STLibianSC-Regular" | |
case STKaitiTC_Black = "STKaitiTC-Black" | |
case STKaitiSC_Black = "STKaitiSC-Black" | |
case STKaitiTC_Bold = "STKaitiTC-Bold" | |
case STKaitiSC_Bold = "STKaitiSC-Bold" | |
case STKaitiTC_Regular = "STKaitiTC-Regular" | |
case STKaiti = "STKaiti" | |
case STKaitiSC_Regular = "STKaitiSC-Regular" | |
case STIXVariants_Regular = "STIXVariants-Regular" | |
case STIXVariants_Bold = "STIXVariants-Bold" | |
case STIXSizeTwoSym_Regular = "STIXSizeTwoSym-Regular" | |
case STIXSizeTwoSym_Bold = "STIXSizeTwoSym-Bold" | |
case STIXSizeThreeSym_Regular = "STIXSizeThreeSym-Regular" | |
case STIXSizeThreeSym_Bold = "STIXSizeThreeSym-Bold" | |
case STIXSizeOneSym_Regular = "STIXSizeOneSym-Regular" | |
case STIXSizeOneSym_Bold = "STIXSizeOneSym-Bold" | |
case STIXSizeFourSym_Regular = "STIXSizeFourSym-Regular" | |
case STIXSizeFourSym_Bold = "STIXSizeFourSym-Bold" | |
case STIXSizeFiveSym_Regular = "STIXSizeFiveSym-Regular" | |
case STIXNonUnicode_Regular = "STIXNonUnicode-Regular" | |
case STIXNonUnicode_Italic = "STIXNonUnicode-Italic" | |
case STIXNonUnicode_BoldItalic = "STIXNonUnicode-BoldItalic" | |
case STIXNonUnicode_Bold = "STIXNonUnicode-Bold" | |
case STIXIntegralsUpSm_Regular = "STIXIntegralsUpSm-Regular" | |
case STIXIntegralsUpSm_Bold = "STIXIntegralsUpSm-Bold" | |
case STIXIntegralsUpD_Regular = "STIXIntegralsUpD-Regular" | |
case STIXIntegralsUpD_Bold = "STIXIntegralsUpD-Bold" | |
case STIXIntegralsUp_Regular = "STIXIntegralsUp-Regular" | |
case STIXIntegralsUp_Bold = "STIXIntegralsUp-Bold" | |
case STIXIntegralsSm_Regular = "STIXIntegralsSm-Regular" | |
case STIXIntegralsSm_Bold = "STIXIntegralsSm-Bold" | |
case STIXIntegralsD_Regular = "STIXIntegralsD-Regular" | |
case STIXIntegralsD_Bold = "STIXIntegralsD-Bold" | |
case STIXGeneral_Regular = "STIXGeneral-Regular" | |
case STIXGeneral_Italic = "STIXGeneral-Italic" | |
case STIXGeneral_BoldItalic = "STIXGeneral-BoldItalic" | |
case STIXGeneral_Bold = "STIXGeneral-Bold" | |
case STHeitiSC_Medium = "STHeitiSC-Medium" | |
case STHeitiTC_Medium = "STHeitiTC-Medium" | |
case STHeitiSC_Light = "STHeitiSC-Light" | |
case STHeitiTC_Light = "STHeitiTC-Light" | |
case STHeiti = "STHeiti" | |
case STFangsong = "STFangsong" | |
case STBaoliTC_Regular = "STBaoliTC-Regular" | |
case STBaoliSC_Regular = "STBaoliSC-Regular" | |
case Somer = "Somer" | |
case SnellRoundhand_Black = "SnellRoundhand-Black" | |
case SnellRoundhand_Bold = "SnellRoundhand-Bold" | |
case SnellRoundhand = "SnellRoundhand" | |
case Skia_Regular_Bold = "Skia-Regular_Bold" | |
case Skia_Regular_Light_Condensed = "Skia-Regular_Light-Condensed" | |
case Skia_Regular_Black_Condensed = "Skia-Regular_Black-Condensed" | |
case Skia_Regular_Light_Extended = "Skia-Regular_Light-Extended" | |
case Skia_Regular_Black_Extended = "Skia-Regular_Black-Extended" | |
case Skia_Regular_Light = "Skia-Regular_Light" | |
case Skia_Regular_Condensed = "Skia-Regular_Condensed" | |
case Skia_Regular_Extended = "Skia-Regular_Extended" | |
case Skia_Regular_Black = "Skia-Regular_Black" | |
case Skia_Regular = "Skia-Regular" | |
case SinhalaSangamMN_Bold = "SinhalaSangamMN-Bold" | |
case SinhalaSangamMN = "SinhalaSangamMN" | |
case SinhalaMN_Bold = "SinhalaMN-Bold" | |
case SinhalaMN = "SinhalaMN" | |
case Silom = "Silom" | |
case SIL_Kai_Reg_Jian = "SIL-Kai-Reg-Jian" | |
case SIL_Hei_Med_Jian = "SIL-Hei-Med-Jian" | |
case SignPainter_HouseScript = "SignPainter-HouseScript" | |
case ShreeDev0714_Bold_Italic = "ShreeDev0714-Bold-Italic" | |
case ShreeDev0714_Italic = "ShreeDev0714-Italic" | |
case ShreeDev0714_Bold = "ShreeDev0714-Bold" | |
case ShreeDev0714 = "ShreeDev0714" | |
case SchoolHousePrintedA = "SchoolHousePrintedA" | |
case SchoolHouseCursiveB = "SchoolHouseCursiveB" | |
case Sathu = "Sathu" | |
case SantaFeLetPlain = "SantaFeLetPlain" | |
case Sana = "Sana" | |
case Raya = "Raya" | |
case RaananaBold = "RaananaBold" | |
case Raanana = "Raanana" | |
case PTSerif_Bold = "PTSerif-Bold" | |
case PTSerif_BoldItalic = "PTSerif-BoldItalic" | |
case PTSerif_Italic = "PTSerif-Italic" | |
case PTSerif_Regular = "PTSerif-Regular" | |
case PTSerif_CaptionItalic = "PTSerif-CaptionItalic" | |
case PTSerif_Caption = "PTSerif-Caption" | |
case PTSans_Bold = "PTSans-Bold" | |
case PTSans_BoldItalic = "PTSans-BoldItalic" | |
case PTSans_Caption = "PTSans-Caption" | |
case PTSans_CaptionBold = "PTSans-CaptionBold" | |
case PTSans_Narrow = "PTSans-Narrow" | |
case PTSans_NarrowBold = "PTSans-NarrowBold" | |
case PTSans_Italic = "PTSans-Italic" | |
case PTSans_Regular = "PTSans-Regular" | |
case PTMono_Regular = "PTMono-Regular" | |
case PTMono_Bold = "PTMono-Bold" | |
case PrincetownLET = "PrincetownLET" | |
case PortagoITCTT = "PortagoITCTT" | |
case PlantagenetCherokee = "PlantagenetCherokee" | |
case Phosphate_Solid = "Phosphate-Solid" | |
case Phosphate_Inline = "Phosphate-Inline" | |
case Osaka_Mono = "Osaka-Mono" | |
case Osaka = "Osaka" | |
case OriyaSangamMN_Bold = "OriyaSangamMN-Bold" | |
case OriyaSangamMN = "OriyaSangamMN" | |
case OriyaMN_Bold = "OriyaMN-Bold" | |
case OriyaMN = "OriyaMN" | |
case Nisan = "Nisan" | |
case NewPeninimMT_Bold = "NewPeninimMT-Bold" | |
case NewPeninimMT_BoldInclined = "NewPeninimMT-BoldInclined" | |
case NewPeninimMT_Inclined = "NewPeninimMT-Inclined" | |
case NewPeninimMT = "NewPeninimMT" | |
case NanumMyeongjoExtraBold = "NanumMyeongjoExtraBold" | |
case NanumMyeongjoBold = "NanumMyeongjoBold" | |
case NanumMyeongjo = "NanumMyeongjo" | |
case NanumGothicExtraBold = "NanumGothicExtraBold" | |
case NanumGothicBold = "NanumGothicBold" | |
case NanumGothic = "NanumGothic" | |
case NanumPen = "NanumPen" | |
case NanumBrush = "NanumBrush" | |
case Nadeem = "Nadeem" | |
case MyriadArabic_BlackIt = "MyriadArabic-BlackIt" | |
case MyriadArabic_Black = "MyriadArabic-Black" | |
case MyriadArabic_SemiboldIt = "MyriadArabic-SemiboldIt" | |
case MyriadArabic_LightIt = "MyriadArabic-LightIt" | |
case MyriadArabic_Light = "MyriadArabic-Light" | |
case MyriadArabic_BoldIt = "MyriadArabic-BoldIt" | |
case MyriadArabic_It = "MyriadArabic-It" | |
case MyriadArabic_Bold = "MyriadArabic-Bold" | |
case MyriadArabic_Regular = "MyriadArabic-Regular" | |
case MyanmarSangamMN_Bold = "MyanmarSangamMN-Bold" | |
case MyanmarSangamMN = "MyanmarSangamMN" | |
case MyanmarMN_Bold = "MyanmarMN-Bold" | |
case MyanmarMN = "MyanmarMN" | |
case MunaBlack = "MunaBlack" | |
case MunaBold = "MunaBold" | |
case Muna = "Muna" | |
case MshtakanBoldOblique = "MshtakanBoldOblique" | |
case MshtakanBold = "MshtakanBold" | |
case MshtakanOblique = "MshtakanOblique" | |
case Mshtakan = "Mshtakan" | |
case MonotypeGurmukhi = "MonotypeGurmukhi" | |
case MonaLisaSolidITCTT = "MonaLisaSolidITCTT" | |
case Monaco = "Monaco" | |
case MLingWaiMedium_TC = "MLingWaiMedium-TC" | |
case MLingWaiMedium_SC = "MLingWaiMedium-SC" | |
case MicrosoftSansSerif = "MicrosoftSansSerif" | |
case MalayalamMN_Bold = "MalayalamMN-Bold" | |
case MalayalamMN = "MalayalamMN" | |
case Luminari_Regular = "Luminari-Regular" | |
case LucidaGrande_Bold = "LucidaGrande-Bold" | |
case LucidaGrande = "LucidaGrande" | |
case LiSungLight = "LiSungLight" | |
case LiSongPro = "LiSongPro" | |
case LiHeiPro = "LiHeiPro" | |
case LiGothicMed = "LiGothicMed" | |
case LaoMN_Bold = "LaoMN-Bold" | |
case LaoMN = "LaoMN" | |
case Laimoon = "Laimoon" | |
case KufiStandardGK = "KufiStandardGK" | |
case Krungthep = "Krungthep" | |
case KoufiAbjadi = "KoufiAbjadi" | |
case Kokonor = "Kokonor" | |
case KohinoorTelugu_Light = "KohinoorTelugu-Light" | |
case KohinoorTelugu_Bold = "KohinoorTelugu-Bold" | |
case KohinoorTelugu_Medium = "KohinoorTelugu-Medium" | |
case KohinoorTelugu_Semibold = "KohinoorTelugu-Semibold" | |
case KohinoorTelugu_Regular = "KohinoorTelugu-Regular" | |
case KohinoorBangla_Light = "KohinoorBangla-Light" | |
case KohinoorBangla_Bold = "KohinoorBangla-Bold" | |
case KohinoorBangla_Medium = "KohinoorBangla-Medium" | |
case KohinoorBangla_Semibold = "KohinoorBangla-Semibold" | |
case KohinoorBangla_Regular = "KohinoorBangla-Regular" | |
case Klee_Medium = "Klee-Medium" | |
case Klee_Demibold = "Klee-Demibold" | |
case KhmerMN_Bold = "KhmerMN-Bold" | |
case KhmerMN = "KhmerMN" | |
case Kefa_Bold = "Kefa-Bold" | |
case Kefa_Regular = "Kefa-Regular" | |
case KannadaMN_Bold = "KannadaMN-Bold" | |
case KannadaMN = "KannadaMN" | |
case JCsmPC = "JCsmPC" | |
case JCkg = "JCkg" | |
case JCHEadA = "JCHEadA" | |
case JCfg = "JCfg" | |
case JazzLetPlain = "JazzLetPlain" | |
case ITFDevanagariMarathi_Medium = "ITFDevanagariMarathi-Medium" | |
case ITFDevanagariMarathi_Light = "ITFDevanagariMarathi-Light" | |
case ITFDevanagariMarathi_Demi = "ITFDevanagariMarathi-Demi" | |
case ITFDevanagariMarathi_Bold = "ITFDevanagariMarathi-Bold" | |
case ITFDevanagariMarathi_Book = "ITFDevanagariMarathi-Book" | |
case ITFDevanagari_Medium = "ITFDevanagari-Medium" | |
case ITFDevanagari_Light = "ITFDevanagari-Light" | |
case ITFDevanagari_Demi = "ITFDevanagari-Demi" | |
case ITFDevanagari_Bold = "ITFDevanagari-Bold" | |
case ITFDevanagari_Book = "ITFDevanagari-Book" | |
case IowanOldStyle_Titling = "IowanOldStyle-Titling" | |
case IowanOldStyle_BlackItalic = "IowanOldStyle-BlackItalic" | |
case IowanOldStyle_Black = "IowanOldStyle-Black" | |
case IowanOldStyle_BoldItalic = "IowanOldStyle-BoldItalic" | |
case IowanOldStyle_Italic = "IowanOldStyle-Italic" | |
case IowanOldStyle_Bold = "IowanOldStyle-Bold" | |
case IowanOldStyle_Roman = "IowanOldStyle-Roman" | |
case InaiMathi = "InaiMathi" | |
case Impact = "Impact" | |
case HopperScript_Regular = "HopperScript-Regular" | |
case HoeflerText_Ornaments = "HoeflerText-Ornaments" | |
case HiraMinPro_W6 = "HiraMinPro-W6" | |
case HiraMinPro_W3 = "HiraMinPro-W3" | |
case HiraMaruProN_W4 = "HiraMaruProN-W4" | |
case HiraMaruPro_W4 = "HiraMaruPro-W4" | |
case HiraginoSansGB_W6 = "HiraginoSansGB-W6" | |
case HiraginoSansGB_W3 = "HiraginoSansGB-W3" | |
case HiraginoSansCNS_W6 = "HiraginoSansCNS-W6" | |
case HiraginoSansCNS_W3 = "HiraginoSansCNS-W3" | |
case HiraginoSans_W9 = "HiraginoSans-W9" | |
case HiraKakuStdN_W8 = "HiraKakuStdN-W8" | |
case HiraKakuStd_W8 = "HiraKakuStd-W8" | |
case HiraginoSans_W8 = "HiraginoSans-W8" | |
case HiraginoSans_W7 = "HiraginoSans-W7" | |
case HiraKakuPro_W6 = "HiraKakuPro-W6" | |
case HiraKakuProN_W6 = "HiraKakuProN-W6" | |
case HiraginoSans_W6 = "HiraginoSans-W6" | |
case HiraginoSans_W5 = "HiraginoSans-W5" | |
case HiraginoSans_W4 = "HiraginoSans-W4" | |
case HiraKakuPro_W3 = "HiraKakuPro-W3" | |
case HiraKakuProN_W3 = "HiraKakuProN-W3" | |
case HiraginoSans_W3 = "HiraginoSans-W3" | |
case HiraginoSans_W2 = "HiraginoSans-W2" | |
case HiraginoSans_W1 = "HiraginoSans-W1" | |
case HiraginoSans_W0 = "HiraginoSans-W0" | |
case Herculanum = "Herculanum" | |
case HelveticaCY_BoldOblique = "HelveticaCY-BoldOblique" | |
case HelveticaCY_Oblique = "HelveticaCY-Oblique" | |
case HelveticaCY_Bold = "HelveticaCY-Bold" | |
case HelveticaCY_Plain = "HelveticaCY-Plain" | |
case HanziPenTC_W5 = "HanziPenTC-W5" | |
case HanziPenSC_W5 = "HanziPenSC-W5" | |
case HanziPenTC_W3 = "HanziPenTC-W3" | |
case HanziPenSC_W3 = "HanziPenSC-W3" | |
case HannotateTC_W7 = "HannotateTC-W7" | |
case HannotateSC_W7 = "HannotateSC-W7" | |
case HannotateTC_W5 = "HannotateTC-W5" | |
case HannotateSC_W5 = "HannotateSC-W5" | |
case GurmukhiSangamMN_Bold = "GurmukhiSangamMN-Bold" | |
case GurmukhiSangamMN = "GurmukhiSangamMN" | |
case GujaratiMT_Bold = "GujaratiMT-Bold" | |
case GujaratiMT = "GujaratiMT" | |
case GillSans_LightItalic = "GillSans-LightItalic" | |
case GillSans_Light = "GillSans-Light" | |
case GillSans_UltraBold = "GillSans-UltraBold" | |
case GillSans_SemiBoldItalic = "GillSans-SemiBoldItalic" | |
case GillSans_SemiBold = "GillSans-SemiBold" | |
case GillSans_BoldItalic = "GillSans-BoldItalic" | |
case GillSans_Italic = "GillSans-Italic" | |
case GillSans_Bold = "GillSans-Bold" | |
case GillSans = "GillSans" | |
case GenevaCyr = "GenevaCyr" | |
case Geneva = "Geneva" | |
case Garamond_BoldItalic = "Garamond-BoldItalic" | |
case Garamond_Italic = "Garamond-Italic" | |
case Garamond_Bold = "Garamond-Bold" | |
case Garamond = "Garamond" | |
case FZLTTHB__B51_0 = "FZLTTHB--B51-0" | |
case FZLTXHB__B51_0 = "FZLTXHB--B51-0" | |
case FZLTZHB__B51_0 = "FZLTZHB--B51-0" | |
case FZLTTHK__GBK1_0 = "FZLTTHK--GBK1-0" | |
case FZLTXHK__GBK1_0 = "FZLTXHK--GBK1-0" | |
case FZLTZHK__GBK1_0 = "FZLTZHK--GBK1-0" | |
case ForgottenFuturist_Shadow = "ForgottenFuturist-Shadow" | |
case ForgottenFuturist_BoldItalic = "ForgottenFuturist-BoldItalic" | |
case ForgottenFuturist_Bold = "ForgottenFuturist-Bold" | |
case ForgottenFuturist_Italic = "ForgottenFuturist-Italic" | |
case ForgottenFuturist_Regular = "ForgottenFuturist-Regular" | |
case Farisi = "Farisi" | |
case Farah = "Farah" | |
case DiwanThuluth = "DiwanThuluth" | |
case DiwanMishafiGold = "DiwanMishafiGold" | |
case DiwanKufi = "DiwanKufi" | |
case Dijla = "Dijla" | |
case DFWaWaTC_W5 = "DFWaWaTC-W5" | |
case DFWaWaSC_W5 = "DFWaWaSC-W5" | |
case DFKaiShu_SB_Estd_BF = "DFKaiShu-SB-Estd-BF" | |
case DevanagariMT_Bold = "DevanagariMT-Bold" | |
case DevanagariMT = "DevanagariMT" | |
case DecoTypeNaskh = "DecoTypeNaskh" | |
case DearJoeFour_Small = "DearJoeFour-Small" | |
case DearJoeFour_Regular = "DearJoeFour-Regular" | |
case CorsivaHebrew_Bold = "CorsivaHebrew-Bold" | |
case CorsivaHebrew = "CorsivaHebrew" | |
case ComicSansMS_Bold = "ComicSansMS-Bold" | |
case ComicSansMS = "ComicSansMS" | |
case CharcoalCY = "CharcoalCY" | |
case Chalkboard_Bold = "Chalkboard-Bold" | |
case Chalkboard = "Chalkboard" | |
case CenturySchoolbook_BoldItalic = "CenturySchoolbook-BoldItalic" | |
case CenturySchoolbook_Italic = "CenturySchoolbook-Italic" | |
case CenturySchoolbook_Bold = "CenturySchoolbook-Bold" | |
case CenturySchoolbook = "CenturySchoolbook" | |
case CenturyGothic_BoldItalic = "CenturyGothic-BoldItalic" | |
case CenturyGothic_Italic = "CenturyGothic-Italic" | |
case CenturyGothic_Bold = "CenturyGothic-Bold" | |
case CenturyGothic = "CenturyGothic" | |
case CapitalsRegular = "CapitalsRegular" | |
case BrushScriptMT = "BrushScriptMT" | |
case BraganzaITCTT = "BraganzaITCTT" | |
case BradleyHandITCTT_Bold = "BradleyHandITCTT-Bold" | |
case BordeauxRomanBoldLetPlain = "BordeauxRomanBoldLetPlain" | |
case BookmanOldStyle_BoldItalic = "BookmanOldStyle-BoldItalic" | |
case BookmanOldStyle_Italic = "BookmanOldStyle-Italic" | |
case BookmanOldStyle_Bold = "BookmanOldStyle-Bold" | |
case BookmanOldStyle = "BookmanOldStyle" | |
case BookAntiqua_BoldItalic = "BookAntiqua-BoldItalic" | |
case BookAntiqua_Italic = "BookAntiqua-Italic" | |
case BookAntiqua_Bold = "BookAntiqua-Bold" | |
case BookAntiqua = "BookAntiqua" | |
case BodoniSvtyTwoSCITCTT_Book = "BodoniSvtyTwoSCITCTT-Book" | |
case BodoniSvtyTwoOSITCTT_Bold = "BodoniSvtyTwoOSITCTT-Bold" | |
case BodoniSvtyTwoOSITCTT_BookIt = "BodoniSvtyTwoOSITCTT-BookIt" | |
case BodoniSvtyTwoOSITCTT_Book = "BodoniSvtyTwoOSITCTT-Book" | |
case BodoniSvtyTwoITCTT_Bold = "BodoniSvtyTwoITCTT-Bold" | |
case BodoniSvtyTwoITCTT_BookIta = "BodoniSvtyTwoITCTT-BookIta" | |
case BodoniSvtyTwoITCTT_Book = "BodoniSvtyTwoITCTT-Book" | |
case BodoniOrnamentsITCTT = "BodoniOrnamentsITCTT" | |
case BlairMdITCTT_Medium = "BlairMdITCTT-Medium" | |
case BlackmoorLetPlain = "BlackmoorLetPlain" | |
case BigCaslon_Medium = "BigCaslon-Medium" | |
case Beirut = "Beirut" | |
case Basra_Bold = "Basra-Bold" | |
case Basra = "Basra" | |
case BankGothic_Medium = "BankGothic-Medium" | |
case BankGothic_Light = "BankGothic-Light" | |
case BanglaSangamMN_Bold = "BanglaSangamMN-Bold" | |
case BanglaSangamMN = "BanglaSangamMN" | |
case BanglaMN_Bold = "BanglaMN-Bold" | |
case BanglaMN = "BanglaMN" | |
case Baghdad = "Baghdad" | |
case Ayuthaya = "Ayuthaya" | |
case ArialUnicodeMS = "ArialUnicodeMS" | |
case ArialNarrow_Italic = "ArialNarrow-Italic" | |
case ArialNarrow_BoldItalic = "ArialNarrow-BoldItalic" | |
case ArialNarrow_Bold = "ArialNarrow-Bold" | |
case ArialNarrow = "ArialNarrow" | |
case ArialMT = "ArialMT" | |
case ArialHebrewScholar_Light = "ArialHebrewScholar-Light" | |
case ArialHebrewScholar_Bold = "ArialHebrewScholar-Bold" | |
case ArialHebrewScholar = "ArialHebrewScholar" | |
case ArialHebrew_Light = "ArialHebrew-Light" | |
case ArialHebrew_Bold = "ArialHebrew-Bold" | |
case ArialHebrew = "ArialHebrew" | |
case Arial_Black = "Arial-Black" | |
case AppleSymbols = "AppleSymbols" | |
case AppleSDGothicNeo_Heavy = "AppleSDGothicNeo-Heavy" | |
case AppleSDGothicNeo_ExtraBold = "AppleSDGothicNeo-ExtraBold" | |
case AppleSDGothicNeo_UltraLight = "AppleSDGothicNeo-UltraLight" | |
case AppleSDGothicNeo_Thin = "AppleSDGothicNeo-Thin" | |
case AppleSDGothicNeo_Light = "AppleSDGothicNeo-Light" | |
case AppleSDGothicNeo_Bold = "AppleSDGothicNeo-Bold" | |
case AppleSDGothicNeo_SemiBold = "AppleSDGothicNeo-SemiBold" | |
case AppleSDGothicNeo_Medium = "AppleSDGothicNeo-Medium" | |
case AppleSDGothicNeo_Regular = "AppleSDGothicNeo-Regular" | |
case AppleMyungjo = "AppleMyungjo" | |
case AppleBraille_Pinpoint8Dot = "AppleBraille-Pinpoint8Dot" | |
case AppleBraille_Pinpoint6Dot = "AppleBraille-Pinpoint6Dot" | |
case AppleBraille_Outline8Dot = "AppleBraille-Outline8Dot" | |
case AppleBraille_Outline6Dot = "AppleBraille-Outline6Dot" | |
case AppleBraille = "AppleBraille" | |
case Apple_Chancery = "Apple-Chancery" | |
case AndaleMono = "AndaleMono" | |
case AlTarikh = "AlTarikh" | |
case AlRafidainAlFanni = "AlRafidainAlFanni" | |
case Algiers = "Algiers" | |
case AlBayan_Bold = "AlBayan-Bold" | |
case AlBayan = "AlBayan" | |
case Al_Rafidain = "Al-Rafidain" | |
case Al_KhalilBold = "Al-KhalilBold" | |
case Al_Khalil = "Al-Khalil" | |
case Al_Firat = "Al-Firat" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment