@@ -2738,7 +2738,7 @@ MCGFloat MCGContextMeasurePlatformText(MCGContextRef self, const unichar_t *p_te
27382738 if (t_success)
27392739 {
27402740 // MM-2014-06-02: [[ CoreText ]] We no no longer need to store the style - was only needed by Mac/ATSUI.
2741- t_key_length = p_length + sizeof (p_length) + sizeof (p_font . fid) + sizeof (p_font . size) + sizeof (p_transform . a) + sizeof (p_transform . d) ;
2741+ t_key_length = p_length + sizeof (p_length) + sizeof (p_font . fid) + sizeof (p_font . size) + sizeof (p_transform . a) * 4 ;
27422742 t_success = MCMemoryNew (t_key_length, t_key);
27432743 }
27442744
@@ -2772,10 +2772,13 @@ MCGFloat MCGContextMeasurePlatformText(MCGContextRef self, const unichar_t *p_te
27722772 t_key_ptr += sizeof (p_font . size);
27732773
27742774 // MM-2014-04-16: [[ Bug 11964 ]] Store the scale of the transform in the key.
2775- // We only need to store the (x?) scale of the transform as that is all that will effect the text measurment.
2776- // (We are ignoring rotation for the time being).
2775+ // Don't store translation component of transform as it has no effect on bounds
27772776 MCMemoryCopy (t_key_ptr, &p_transform . a, sizeof (p_transform . a));
27782777 t_key_ptr += sizeof (p_transform . a);
2778+ MCMemoryCopy (t_key_ptr, &p_transform . b, sizeof (p_transform . b));
2779+ t_key_ptr += sizeof (p_transform . b);
2780+ MCMemoryCopy (t_key_ptr, &p_transform . c, sizeof (p_transform . c));
2781+ t_key_ptr += sizeof (p_transform . c);
27792782 MCMemoryCopy (t_key_ptr, &p_transform . d, sizeof (p_transform . d));
27802783 t_key_ptr += sizeof (p_transform . d);
27812784
0 commit comments