Sparrow Framework, Bitmap Fonts and Not Having Black Text

Another one of my silly mistakes. I’ve been having problems getting fonts I was using in game (created with the rather excellent Glyph Designer) to display as anything other than a black blobby mess.

Since we’re living in the wonderful world of open source software here, I tracked down the issue to the color being applied to each character. I eagerly knocked up a quick pull request to make the application of color optional.

It turns out none of that was needed. Simply set the color to white and everything is hunky dory:

Transparent Sparrow Fonts
1
2
3
4
5
6
7
8
NSString* fontName = @"my-beautiful-font";
float fontSize = 27.0f;
label = [SPTextField textFieldWithWidth:100.0f
                                 height:30.0f
                                   text:@"funkalicious"
                               fontName:fontName
                               fontSize:fontSize
                                  color:0xffffff];