From 00182b653e6202dcffa692aa17c66aac4f99f424 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sat, 11 Jan 2014 04:24:01 -0800 Subject: [PATCH] UIStringDrawingSuperCrufty must be _legacy_hooked. --- Library.mm | 10 ++++++++++ 1 file changed, 10 insertions(+) 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$)); } // }}} -- 2.45.2