Skip to content

Instantly share code, notes, and snippets.

@danstepanov
Created March 7, 2016 23:57
Show Gist options
  • Save danstepanov/e389643d14c68cb3bf80 to your computer and use it in GitHub Desktop.
Save danstepanov/e389643d14c68cb3bf80 to your computer and use it in GitHub Desktop.

Revisions

  1. danstepanov created this gist Mar 7, 2016.
    13 changes: 13 additions & 0 deletions logAllFonts.swift
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    // ADDING FONTS TO PROJECT
    //
    // 1. Add font to project
    // 2. Make sure in project file, the fonts are in "Copy Bundle Resources" under "Build Phases"
    // 3. Add font file names to Info.plist "Fonts provided by Application"
    // 4. Use code below to print the name used by UIFont; it might not be what you expect.

    for (NSString *familyName in [UIFont familyNames]) {
    NSLog(@"%@", familyName);
    for (NSString *name in [UIFont fontNamesForFamilyName:familyName]) {
    NSLog(@" %@", name);
    }
    }