I'm loading a font and setting it on a label like this
UIFont *font = [UIFont fontWithName:@"MyMonoFont" size:150.0];
label.font = font;
label.text = "TOBY"
However, it seems to clip or hide the bottom part of the text (as shown below). It works fine with another font I tried. Both fonts are TTF and are "valid" according to the "validate" action in Mac's Font Book app.
There are some constraints (it's auto layout) but as I say, anther font seems to cope ok.
Thanks for any hints.
EDIT: Bit of an update; updating the label frame size doesn't make a difference (if I have auto layout on). I'd like to keep auto layout on but suspect its clashing / resizing the frames. I wonder if theres a way for them to play nicely.
Increase the height of frame of label according to font size of your label .
label.frame = your frame.
Use the sizeToFit
method of UILabel to achieve this.
[label sizeToFit];
or manually compute the label's size and set the label's frame Dynamically changing font size of UILabel
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With