AliSoftware / OHAttributedLabel

UILabel that supports NSAttributedString
https://github.com/AliSoftware/OHAttributedLabel/wiki
1.51k stars 344 forks source link

wrong line spacing when text contains emoji. #182

Closed gslqy closed 10 years ago

gslqy commented 10 years ago

Hi, hope you can help me. when the whole text contains emoji character, the line which contain emoji seems higher than the others. I don't know how to fix it. here's a image link about the description. http://ho-ur.com/upload/emoji.png

AliSoftware commented 10 years ago

Unfortunately, emoji are glyphs that are higher than other standard characters, so that's a normal behavior.

By the way, OHAttributedLabel uses standard CoreText and its CTFrameSetter to let CoreText do the text layout for you, so this is not really related to OHAttributedLabel itself but to how CoreTexts manages the layout of emojis and such glyphs.


Side note: I intend to stop the support for OHAttributedLabel soon, as it begins to be an old library that is not really maintained anymore due both to a lack of time from my side and the more and more lack of usefulness of such a class/library now that iOS6 supports NSAttributedStrings natively to be displayed in UILabels. Will announce this soon with a new commit to add some note in the README.