From 75fb9474b028e86902a70b9aba2a8470d86d7eb3 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Mon, 13 Jul 2015 14:57:13 +0300 Subject: [PATCH] [ios] Added medium fonts to fonts grid. --- iphone/Maps/UIFont+MapsMeFonts.h | 6 ++++ iphone/Maps/UIFont+MapsMeFonts.mm | 54 ++++++++++++++++++++++++------- 2 files changed, 48 insertions(+), 12 deletions(-) diff --git a/iphone/Maps/UIFont+MapsMeFonts.h b/iphone/Maps/UIFont+MapsMeFonts.h index 6d13e0f51c..886bab07c4 100644 --- a/iphone/Maps/UIFont+MapsMeFonts.h +++ b/iphone/Maps/UIFont+MapsMeFonts.h @@ -16,6 +16,12 @@ + (UIFont *)regular17; + (UIFont *)regular18; + (UIFont *)regular24; ++ (UIFont *)medium10; ++ (UIFont *)medium14; ++ (UIFont *)medium16; ++ (UIFont *)medium17; ++ (UIFont *)medium18; ++ (UIFont *)medium24; + (UIFont *)light10; + (UIFont *)light12; + (UIFont *)light16; diff --git a/iphone/Maps/UIFont+MapsMeFonts.mm b/iphone/Maps/UIFont+MapsMeFonts.mm index 0830566bbc..dcd478739e 100644 --- a/iphone/Maps/UIFont+MapsMeFonts.mm +++ b/iphone/Maps/UIFont+MapsMeFonts.mm @@ -8,66 +8,96 @@ #import "UIFont+MapsMeFonts.h" +static NSString * const kRegularFont = @"HelveticaNeue"; +static NSString * const kMediumFont = @"HelveticaNeue-Medium"; +static NSString * const kLightFont = @"HelveticaNeue-Light"; +static NSString * const kBoldFont = @"HelveticaNeue-Bold"; + @implementation UIFont (MapsMeFonts) + (UIFont *)regular10 { - return [UIFont fontWithName:@"HelveticaNeue" size:10]; + return [UIFont fontWithName:kRegularFont size:10]; } + (UIFont *)regular14 { - return [UIFont fontWithName:@"HelveticaNeue" size:14]; + return [UIFont fontWithName:kRegularFont size:14]; } + (UIFont *)regular16 { - return [UIFont fontWithName:@"HelveticaNeue" size:16]; + return [UIFont fontWithName:kRegularFont size:16]; } + (UIFont *)regular17 { - return [UIFont fontWithName:@"HelveticaNeue" size:17]; + return [UIFont fontWithName:kRegularFont size:17]; } + (UIFont *)regular18 { - return [UIFont fontWithName:@"HelveticaNeue" size:18]; + return [UIFont fontWithName:kRegularFont size:18]; } + (UIFont *)regular24 { - return [UIFont fontWithName:@"HelveticaNeue" size:24]; + return [UIFont fontWithName:kRegularFont size:24]; +} + ++ (UIFont *)medium10 +{ + return [UIFont fontWithName:kMediumFont size:10]; +} ++ (UIFont *)medium14 +{ + return [UIFont fontWithName:kMediumFont size:14]; +} ++ (UIFont *)medium16 +{ + return [UIFont fontWithName:kMediumFont size:16]; +} ++ (UIFont *)medium17 +{ + return [UIFont fontWithName:kMediumFont size:17]; +} ++ (UIFont *)medium18 +{ + return [UIFont fontWithName:kMediumFont size:18]; +} ++ (UIFont *)medium24 +{ + return [UIFont fontWithName:kMediumFont size:24]; } + (UIFont *)light10 { - return [UIFont fontWithName:@"HelveticaNeue-Light" size:10]; + return [UIFont fontWithName:kLightFont size:10]; } + (UIFont *)light12 { - return [UIFont fontWithName:@"HelveticaNeue-Light" size:12]; + return [UIFont fontWithName:kLightFont size:12]; } + (UIFont *)light16 { - return [UIFont fontWithName:@"HelveticaNeue-Light" size:16]; + return [UIFont fontWithName:kLightFont size:16]; } + (UIFont *)light17 { - return [UIFont fontWithName:@"HelveticaNeue-Light" size:17]; + return [UIFont fontWithName:kLightFont size:17]; } + (UIFont *)bold16 { - return [UIFont fontWithName:@"HelveticaNeue-Bold" size:16]; + return [UIFont fontWithName:kBoldFont size:16]; } + (UIFont *)bold48 { - return [UIFont fontWithName:@"HelveticaNeue-Bold" size:48]; + return [UIFont fontWithName:kBoldFont size:48]; } + (UIFont *)fontWithName:(NSString *)fontName