@@ -42,7 +42,7 @@ def main():
4242 "text-presentation message heart" : (550 , 980 , 620 , 1035 ),
4343 "bold message heart" : (170 , 1040 , 220 , 1090 ),
4444 "italic message heart" : (430 , 1040 , 490 , 1090 ),
45- "emoji-only message" : (65 , 1490 , 125 , 1545 ),
45+ "emoji-only message" : (65 , 1490 , 200 , 1650 ),
4646 }
4747 warnings = {
4848 "selected warning reaction" : (260 , 522 , 325 , 606 ),
@@ -52,13 +52,22 @@ def main():
5252 "text-presentation message warning" : (430 , 1090 , 490 , 1150 ),
5353 "bold message warning" : (230 , 1040 , 290 , 1090 ),
5454 "italic message warning" : (490 , 1040 , 550 , 1090 ),
55- "emoji-only warning" : (130 , 1490 , 190 , 1550 ),
55+ "emoji-only warning" : (205 , 1490 , 335 , 1650 ),
5656 }
5757 for cases , predicate in ((regions , is_red ), (warnings , is_yellow )):
5858 for name , box in cases .items ():
5959 assert not color_pixels (before , box , predicate ), f"{ name } : original must reproduce monochrome glyph"
6060 pixels = color_pixels (after , box , predicate )
6161 assert len (pixels ) > 500 , f"{ name } : expected native color emoji"
62+ if "emoji-only" in name :
63+ # Production uses a separate 36sp path. Reject a fixture that
64+ # accidentally renders normal-sized inline emoji or clips it.
65+ left , right = min (x for x , _ in pixels ), max (x for x , _ in pixels )
66+ top , bottom = min (y for _ , y in pixels ), max (y for _ , y in pixels )
67+ assert len (pixels ) > 4500 , f"{ name } : expected enlarged emoji"
68+ assert 90 <= right - left <= 110 and 90 <= bottom - top <= 110
69+ assert box [0 ] < left < right < box [2 ] - 1
70+ assert box [1 ] < top < bottom < box [3 ] - 1
6271 if "reaction" in name :
6372 center = (min (y for _ , y in pixels ) + max (y for _ , y in pixels )) / 2
6473 pill_center = (box [1 ] + box [3 ] - 1 ) / 2
0 commit comments