2014-11-24 21:51:43 +01:00
|
|
|
//
|
|
|
|
// UIFont+OWS.m
|
|
|
|
// Signal
|
|
|
|
//
|
|
|
|
// Created by Dylan Bourgeois on 25/11/14.
|
|
|
|
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import "UIFont+OWS.h"
|
|
|
|
|
|
|
|
@implementation UIFont (OWS)
|
|
|
|
|
2015-12-22 12:45:09 +01:00
|
|
|
+ (UIFont *)ows_thinFontWithSize:(CGFloat)size {
|
2015-09-01 19:22:08 +02:00
|
|
|
return [UIFont systemFontOfSize:size weight:UIFontWeightThin];
|
2014-11-24 21:51:43 +01:00
|
|
|
}
|
|
|
|
|
2015-12-22 12:45:09 +01:00
|
|
|
+ (UIFont *)ows_lightFontWithSize:(CGFloat)size {
|
2015-09-01 19:22:08 +02:00
|
|
|
return [UIFont systemFontOfSize:size weight:UIFontWeightLight];
|
2014-11-24 21:51:43 +01:00
|
|
|
}
|
|
|
|
|
2015-12-22 12:45:09 +01:00
|
|
|
+ (UIFont *)ows_regularFontWithSize:(CGFloat)size {
|
2015-09-01 19:22:08 +02:00
|
|
|
return [UIFont systemFontOfSize:size weight:UIFontWeightRegular];
|
2014-11-24 21:51:43 +01:00
|
|
|
}
|
|
|
|
|
2015-12-22 12:45:09 +01:00
|
|
|
+ (UIFont *)ows_mediumFontWithSize:(CGFloat)size {
|
2015-09-01 19:22:08 +02:00
|
|
|
return [UIFont systemFontOfSize:size weight:UIFontWeightMedium];
|
2014-12-06 19:26:01 +01:00
|
|
|
}
|
|
|
|
|
2015-12-22 12:45:09 +01:00
|
|
|
+ (UIFont *)ows_boldFontWithSize:(CGFloat)size {
|
2015-09-01 19:22:08 +02:00
|
|
|
return [UIFont boldSystemFontOfSize:size];
|
2014-11-24 21:51:43 +01:00
|
|
|
}
|
|
|
|
|
2015-12-26 17:27:27 +01:00
|
|
|
#pragma mark Dynamic Type
|
|
|
|
|
|
|
|
+ (UIFont *)ows_dynamicTypeBodyFont {
|
|
|
|
return [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
|
|
|
|
}
|
|
|
|
|
2014-11-24 21:51:43 +01:00
|
|
|
@end
|