LTMorphingLabel icon indicating copy to clipboard operation
LTMorphingLabel copied to clipboard

Morphing animation messes up San Francisco Display font

Open Sweeper777 opened this issue 9 years ago • 2 comments

I really like how the colon character (:) is a little bit raised up and not touching the baseline in the San Francisco Display font introduced in WWDC 2015. Here is how it is supposed to look like:

screen shot 2016-07-25 at 3 22 54 pm

However, once I changed the text of the label to something else with the .Fall animation, the colon dropped onto the baseline:

screen shot 2016-07-25 at 3 23 22 pm

I believe that this is caused by the way you draw the text using Core Text. Can you fix it?

Sweeper777 avatar Jul 25 '16 07:07 Sweeper777

Since the frame of each character was calculated based on NSString.sizeWithAttributes method, I can't figure out the proper origin.y. To be lazy, place on the baseline is just a workaround. The TextKit may help, but I'm not familiar with it yet.

lexrus avatar Sep 10 '16 09:09 lexrus

So would you kindly fix this?

Sweeper777 avatar Sep 10 '16 09:09 Sweeper777