]> git.saurik.com Git - winterboard.git/commitdiff
UIStringDrawingSuperCrufty must be _legacy_hooked.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 11 Jan 2014 12:24:01 +0000 (04:24 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 11 Jan 2014 12:24:25 +0000 (04:24 -0800)
Library.mm

index 9724f29aa364ddca951eca1330376df387ef4c35..552639a723a5d7e34fa542a233b3ba093fe8bad6 100644 (file)
@@ -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$));
     }
     // }}}