PXFontRegistry Class Reference
| Inherits from | NSObject |
| Declared in | PXFontRegistry.h |
Overview
PXFontRegistry is a singleton reponsible for mapping a font family, style, and weight to a specific instance of a UIFont. Fallback mechnanisms are used when a specific configuration is not available. All lookups are cached, so future lookups are quite fast.
Tasks
-
+ clearRegistryClear the font registry cache.
-
+ fontWithFamily:fontStretch:fontWeight:fontStyle:size:Return a UIFont instance for the specified font family, style, weight, and size.
Class Methods
clearRegistry
Clear the font registry cache.
+ (void)clearRegistryDiscussion
Clear the font registry cache.
This method is mostly used for testing, but it may be used to reduce memory footprint during low memory conditions
Declared In
PXFontRegistry.hfontWithFamily:fontStretch:fontWeight:fontStyle:size:
Return a UIFont instance for the specified font family, style, weight, and size.
+ (UIFont *)fontWithFamily:(NSString *)family fontStretch:(NSString *)stretch fontWeight:(NSString *)weight fontStyle:(NSString *)style size:(CGFloat)sizeParameters
- family
The font family name. If this parameter is nil, then the system font family will be used
- stretch
The stretch of the font.
- weight
The weight of the font.
- style
The style of the font. If this parameter is nil, then the “normal” style will be used
- size
The point size of the font.
Discussion
Return a UIFont instance for the specified font family, style, weight, and size.
Declared In
PXFontRegistry.h