Skip to content

Commit

Permalink
*) Fixed broken font for error string if using Apples Font rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Georg Essl committed Mar 5, 2013
1 parent c4602ba commit ce78f00
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Classes/EAGLView.mm
Expand Up @@ -1372,7 +1372,11 @@ - (void)awakeFromNib
// path to the default font
g_storagePath = [resourcePath UTF8String];
// errorfontPath = storagePath + "/arial.ttf";
#ifndef UISTRINGS
errorfontPath = storagePath + "/DroidSansMono.ttf";
#else
errorfontPath = "Helvetica";
#endif

// Hide top navigation bar
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
Expand Down Expand Up @@ -4687,7 +4691,7 @@ - (void)drawView {
shadowColors[3] = 80;
errorStrTex = [[Texture2D alloc] initWithString:[NSString stringWithUTF8String:errorstr.c_str()]
dimensions:CGSizeMake(SCREEN_WIDTH, 128) alignment:UITextAlignmentCenter
fontName:@"DroidSansMono.ttf" fontSize:14 lineBreakMode:UILineBreakModeWordWrap
fontName:[NSString stringWithUTF8String:errorfontPath.c_str()] fontSize:14 lineBreakMode:UILineBreakModeWordWrap
shadowOffset:CGSizeMake(0,0) shadowBlur:2 shadowColor:shadowColors];
#else
errorStrTex = new urTexture(errorstr.c_str(),errorfontPath.c_str(),20,SCREEN_WIDTH,128);
Expand All @@ -4712,7 +4716,7 @@ - (void)drawView {
shadowColors[3] = 80;
errorStrTex = [[Texture2D alloc] initWithString:[NSString stringWithUTF8String:errorstr.c_str()]
dimensions:CGSizeMake(SCREEN_WIDTH, 128) alignment:UITextAlignmentCenter
fontName:@"DroidSansMono.ttf" fontSize:14 lineBreakMode:UILineBreakModeWordWrap
fontName:[NSString stringWithUTF8String:errorfontPath.c_str()] fontSize:14 lineBreakMode:UILineBreakModeWordWrap
shadowOffset:CGSizeMake(0,0) shadowBlur:2 shadowColor:shadowColors];
#else
errorStrTex = new urTexture(errorstr.c_str(),errorfontPath.c_str(),20,SCREEN_WIDTH,128);
Expand Down

0 comments on commit ce78f00

Please sign in to comment.