Code is as following:
textSize = [text sizeWithAttributes:[self textAttributes:newFont]];
I ensure the input parameters are same. But the result is different. The text content is mixed with English and Chinese. It is: text = @"Start typing to add a caption 你好 and the fact is I don't like you or you can't have the same as the same ones you don't have like yo”;
I hardcode the font size:
newFont = [newFont fontWithSize:19.629999529752041];
The attribute are:
@{NSFontAttributeName: font, NSKernAttributeName: @(0.f)}
I think the input parameters are same. But the result is not the same in different time. I think the result should be same.
Any suggestion will be appreciate.