Skip to content

Instantly share code, notes, and snippets.

@luosheng
Created July 24, 2014 02:48
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save luosheng/ea8b0e91c9f0bd1e5245 to your computer and use it in GitHub Desktop.
Save luosheng/ea8b0e91c9f0bd1e5245 to your computer and use it in GitHub Desktop.
Font with fallback
UIFontDescriptor *fontDescriptor = [UIFontDescriptor fontDescriptorWithFontAttributes:@{
UIFontDescriptorNameAttribute: @"SourceSansPro-Regular",
UIFontDescriptorCascadeListAttribute:
@[
[UIFontDescriptor fontDescriptorWithFontAttributes:@{ UIFontDescriptorNameAttribute: @"Hiragino Sans GB W3" }]
]
}];
});
UIFont *font = [UIFont fontWithDescriptor:fontDescriptor size:pointSize];
@dismory
Copy link

dismory commented Jul 24, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment