Make MDFRobotoFontLoader thread-safe. (#20)

Patched from cl/250318339.
1 file changed
tree: 06305b140c581b9405e586c1f64aad3cd8f2e9fb
  1. examples/
  2. src/
  3. tests/
  4. .clang-format
  5. .codecov.yml
  6. .gitignore
  7. .jazzy.yaml
  8. .travis.yml
  9. AUTHORS
  10. CHANGELOG.md
  11. CONTRIBUTING.md
  12. LICENSE
  13. MDFRobotoFontLoader.podspec
  14. README.md
README.md

Roboto Font Loader

The Roboto Font Loader lazy loads the Roboto font.

Material Design Specifications

Installation

Requirements

  • Xcode 7.0 or higher.
  • iOS SDK version 7.0 or higher.

Installation with CocoaPods

To add this component to your Xcode project using CocoaPods, add the following to your Podfile:

pod 'MDFRobotoFontLoader'

Then, run the following command:

pod install

Usage

The Roboto Font Loader provides APIs for getting the Roboto Fonts. Consider using the Typography Material Component for iOS font styles recommended by Material spec.

Importing

Before using Roboto Font Loader, you'll need to import it:

Objective-C

#import "MaterialRobotoFontLoader.h"

Swift

import MDFRobotoFontLoader

Dependencies

The Roboto Font Loader Component depends on the FontDiskLoader Component.

Objective-C

UIFont *font = [[MDFRobotoFontLoader sharedInstance] regularFontOfSize:16];

Swift

let myFont:UIFont = MDFRobotoFontLoader.sharedInstance()regularFontOfSize(16)