UIButton custom font vertical alignment
- by Willshaw Media
I've got a UIButton which uses a custom font, which is set when my view loads:
- (void)viewDidLoad
{
[super viewDidLoad];
self.searchButton.titleLabel.font = [UIFont fontWithName: @"FONTNAME" size: 15.0 ];
}
The problem I've got is that the font is appearing to float up of the center line. If I comment out this line, the default font appears vertically centered fine. But changing to the custom font breaks the vertical alignment.
I'm getting the same issue on a Table Cell with a custom font too.
Do I need to tell the view somewhere that the custom font is not as tall as other fonts?
EDIT: I've just realized that the font I'm using is a Windows TrueType Font. I can use it fine in TextEdit on the Mac, only a problem with the alignment in my App