From 514d79fde9ab112fd11d0797d102a703294c9cef Mon Sep 17 00:00:00 2001 From: Yuki MIZUNO Date: Mon, 5 Jan 2015 15:26:19 +0900 Subject: [PATCH] Set Roboto font family for text labels and buttons. --- Limelight/AppDelegate.m | 4 ++++ Limelight/UIAppView.m | 2 +- Limelight/UIComputerView.m | 1 + iPad.storyboard | 7 ++++++- iPhone.storyboard | 7 ++++++- 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Limelight/AppDelegate.m b/Limelight/AppDelegate.m index 5a837736..9e762d8b 100644 --- a/Limelight/AppDelegate.m +++ b/Limelight/AppDelegate.m @@ -18,6 +18,10 @@ static NSOperationQueue* mainQueue; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + [[UILabel appearance] setFont:[UIFont fontWithName:@"Roboto-Regular" size:[UIFont systemFontSize]]]; + [[UISegmentedControl appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont fontWithName:@"Roboto-Regular" size:[UIFont systemFontSize]], NSFontAttributeName, nil] forState:UIControlStateNormal]; + [[UIButton appearance].titleLabel setFont:[UIFont fontWithName:@"Roboto-Regular" size:[UIFont systemFontSize]]]; + return YES; } diff --git a/Limelight/UIAppView.m b/Limelight/UIAppView.m index 40df8d6c..7c25a494 100644 --- a/Limelight/UIAppView.m +++ b/Limelight/UIAppView.m @@ -58,7 +58,7 @@ static int LABEL_DY = 20; CGFloat padding = 4.f; [_appLabel setFrame: CGRectMake(padding, padding, _appButton.frame.size.width - 2 * padding, _appButton.frame.size.height - 2 * padding)]; [_appLabel setTextColor:[UIColor whiteColor]]; - [_appLabel setFont:[UIFont systemFontOfSize:10.f]]; + [_appLabel setFont:[UIFont fontWithName:@"Roboto-Regular" size:10.f]]; [_appLabel setBaselineAdjustment:UIBaselineAdjustmentAlignCenters]; [_appLabel setTextAlignment:NSTextAlignmentCenter]; [_appLabel setLineBreakMode:NSLineBreakByWordWrapping]; diff --git a/Limelight/UIComputerView.m b/Limelight/UIComputerView.m index 7cc72450..aa562840 100644 --- a/Limelight/UIComputerView.m +++ b/Limelight/UIComputerView.m @@ -29,6 +29,7 @@ static int LABEL_DY = 20; _hostButton.layer.shadowOpacity = 0.7; _hostLabel = [[UILabel alloc] init]; + [_hostLabel setFont:[UIFont fontWithName:@"Roboto-Regular" size:[UIFont systemFontSize]]]; return self; } diff --git a/iPad.storyboard b/iPad.storyboard index 98ba7403..9b184a7f 100644 --- a/iPad.storyboard +++ b/iPad.storyboard @@ -3,6 +3,11 @@ + + + Roboto-Regular + + @@ -39,7 +44,7 @@