jessesquires / BButton

Twitter Bootstrap buttons for iOS
http://cocoadocs.org/docsets/BButton/
Other
712 stars 82 forks source link

Is the letter "g" being cut off at the bottom? #12

Closed cyberbum closed 11 years ago

cyberbum commented 11 years ago

Hi! Love the buttons! One issue: the "g" seems to be getting cut-off at the bottom? If you look at the screenshot on the main page, the "Warning" font on the left seems fine, but the "Warning" button on the right screenshot looks like its clipped at the bottom.

Is that normal, or it's just font awesome's "g" font?

Update: this only happens when I create a button via the Interface builder. If I used the same code as the demo to dynamically create a button, the "g" is no longer cut off.

Update 2: I can reproduce it 100%. It's when you add an awesome icon to a button, and you have text with a lowercase "g".

jessesquires commented 11 years ago

Ah, this appears to be an issue with FontAwesome for iOS.

@leberwurstsaft -- can you help?

leberwurstsaft commented 11 years ago

I'll have a look, probably on Monday.

cyberbum commented 11 years ago

Hey I found a solution. It was written in the FontAwesome for iOS page: http://www.andyyardley.com/2012/04/24/custom-ios-fonts-and-how-to-fix-the-vertical-position-problem/

Basically I needed to modify the .ttf font and adjust it. Fixed my problem!

jessesquires commented 11 years ago

thanks @cyberbum -- could you please submit a pull request with the fix? perhaps you could for @leberwurstsaft, too. :)

cyberbum commented 11 years ago

Will do! I'm new to Github so I'll try as soon as I figure it out:)

oproulx commented 7 years ago

The FontAwesome trick didn't resolve the issue for me. It just made the top AND bottom cutoff. I was able to narrow the issue a little further however. It only happens if I add the button in interfacebuilder AND I set an icon programatically.