Skip to content

Instantly share code, notes, and snippets.

@ahknight
Created February 19, 2014 17:33
Show Gist options
  • Save ahknight/9097032 to your computer and use it in GitHub Desktop.
Save ahknight/9097032 to your computer and use it in GitHub Desktop.

Revisions

  1. ahknight created this gist Feb 19, 2014.
    13 changes: 13 additions & 0 deletions add_fonts_to_info_plist.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #!/bin/bash
    if [ -z $1 ]; then
    echo "usage: `basename $0` /full/path/to/MYPROJ-Info.plist font1.(ttf|otf) [font2 font3 ...] #names of font files"
    exit 1
    fi

    PLIST=$1
    shift
    FONTS=$@

    for FONT in $FONTS; do
    defaults write "${PLIST//.plist/}" UIAppFonts -array-add "${FONT}"
    done