Rubymotion Custom Fonts

March 26, 2013 by mtchavez

In your Rakefile add your font in the app setup.

Motion::Project::App.setup do |app|
  # App Settings
  app.fonts = ['st-marie.ttf']

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

# Returns array of font names for 'St Marie'
UIFont.fontNamesForFamilyName 'St Marie'


mtchavez All rights reserved.