Having an issue where a custom font (FontAwesome) is not rendering properly. The bottom is getting cut off, so for example you can't see the loop in a lowercase "g" and looks like a backwards "p".
From what it seems I can correct this with the ascender/descender ?
Anyone know how to use it???
Thanks!
Create a custom label and adjust the text position like:
public class ExtensionLabel : UILabel { public override void DrawText(CGRect rect) { if (Font.Name == "FontAwesome") { var newBounds = new CGRect(rect.X, rect.Y - 2, rect.Width, rect.Height); base.DrawText(newBounds); } else { base.DrawText(rect); } } }
Answers
Create a custom label and adjust the text position like:
I can see what you're going for and spot on!
However I'm not able to get that working; mostly due to PEBCAK, not sure what to do/how to use it
other than putting it into iOS instance.
Also, I need to do this with Buttons and the properties there were different so that venture didn't end well either haha
This is what I am doing, but not sure how to override the loading of UILabel so I don't have to add a custom controller on EVERY page.
Totally PEBCAK......I removed the "[assembly: Expor...."
Everything works. Thanks!
I lost the "Awesome" in Font Awesome........... custom font is gone