Skip to content

Instantly share code, notes, and snippets.

@attomos
Created December 6, 2013 13:29
Show Gist options
  • Select an option

  • Save attomos/7823809 to your computer and use it in GitHub Desktop.

Select an option

Save attomos/7823809 to your computer and use it in GitHub Desktop.
# In your Rakefile add your font in the app setup.
Motion::Project::App.setup do |app|
# App Settings
app.fonts = ['st-marie.ttf']
end
# Make sure your st-marie.ttf is in your resources directory
# To use in your app do the following
my_font = UIFont.fontWithName 'St Marie', size: 32
# To find your font family name
UIFont.familyNames.sort # Should contain 'St Marie'
# To find the font names for a family name
UIFont.fontNamesForFamilyName 'St Marie' # Returns array of font names for 'St Marie'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment