UILable text is not align vertically correctly with accented languages/fonts
Originator: | Ido.Monzon | ||
Number: | rdar://45485057 | Date Originated: | October 23 2018 |
Status: | Open | Resolved: | No |
Product: | UIKit | Product Version: | iOS 12.0.1 (16A404) |
Classification: | Bug | Reproducible: | Always |
Area: UIKit Summary: UILable text is not align vertically correctly with accented languages/fonts. For example, Hebrew, it has letters that written in the same hight of english letters, but there are letters that can have some accents above or below it. Right now the accented part is just cutting off from the label (unless we adding some padding, but it still won't be aligned vertically correctly. This bug affecting also on the subtitles in videos (you should add there also a little but more padding), on buttons' text, on the navigation bar's buttons' text and so on. The solution for this problem is quite simple, you just have to do some little checking in the drawText(in rect:) function of the UILabel class, and then recalculate it's hight based on the font hight, what will also solve the vertical align problem. Steps to Reproduce: Just make some UILabel and change it text to accented language text (such as Hebrew, with for example those letters: ״אלקץ״ that all of them will reproduce the problem, except ״א״). Expected Results: The text should be aligned vertically correctly. Actual Results: The text it cutting off the UILabel. Version/Build: iOS 12.0.1 (16A404) Configuration: iPhone X 64GB The language is set to Hebrew
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!