Closed LorDisturbia closed 5 years ago
@LorDisturbia thank you so much for reporting this! I'd love to have it get fixed and stay fixed. Would you mind adding some tests?
@ZevEisenberg PR updated with the test :)
@ZevEisenberg Let me know if need anything else from me in order to merge the PR. :)
@LorDisturbia will do - I'll need a little time to review it, which I haven't had yet. Is this blocking you? Can you point your project at the branch? I'll try to get it landed when I've got some time. Thanks for adding tests!
@ZevEisenberg No worries, just wanted to check if you needed anything else. We already implemented a workaround in our project. :)
Thanks! We've got a new co-op who is clearing some of the dust off BonMot and getting it building properly in the latest Xcode. Once we do that, we'll hopefully have some time to merge in some of the PRs that have been piling up. I'm excited to land this one!
I don't mind at all! I'm happy to know my fix is going to be included :)
The current implementation of
removeKerningFromLastCharacter
andrestoreKerningOnLastCharacter
start from the assumption that the last character range always has length 1. This however is not true for more complex characters, such as emojis. The consequence of this was a bug in which applying a style to a string that ended with an emoji, while keeping the flagstripTrailingKerning
to its default value oftrue
, would result in the emoji not being shown at all.