From: Jay Freeman (saurik) Date: Sat, 11 Jan 2014 12:24:01 +0000 (-0800) Subject: UIStringDrawingSuperCrufty must be _legacy_hooked. X-Git-Tag: v0.9.3912~13 X-Git-Url: https://git.saurik.com/winterboard.git/commitdiff_plain/00182b653e6202dcffa692aa17c66aac4f99f424?ds=inline UIStringDrawingSuperCrufty must be _legacy_hooked. --- diff --git a/Library.mm b/Library.mm index 9724f29..552639a 100644 --- a/Library.mm +++ b/Library.mm @@ -2394,6 +2394,16 @@ MSInitialize { if (![@"" respondsToSelector:includeEmoji]) includeEmoji = @selector(drawAtPoint:forWidth:withFont:lineBreakMode:letterSpacing:includeEmoji:); MSHookMessage($NSString, includeEmoji, MSHake(NSString$drawAtPoint$forWidth$withFont$lineBreakMode$letterSpacing$includeEmoji$)); + + SEL letterSpacing(@selector(_legacy_sizeWithFont:forWidth:lineBreakMode:letterSpacing:)); + if (![@"" respondsToSelector:letterSpacing]) + letterSpacing = @selector(sizeWithFont:forWidth:lineBreakMode:letterSpacing:); + MSHookMessage($NSString, letterSpacing, MSHake(NSString$sizeWithFont$forWidth$lineBreakMode$letterSpacing$)); + + SEL sizeWithFont(@selector(_legacy_sizeWithFont:)); + if (![@"" respondsToSelector:sizeWithFont]) + sizeWithFont = @selector(sizeWithFont:); + MSHookMessage($NSString, sizeWithFont, MSHake(NSString$sizeWithFont$)); } // }}}