+ XCharStruct e;
+
+ texture_string_metrics (ss->texfont, title, &e, &ascent, &descent);
+ sw = e.width;
+ sh = ascent; /* + descent; */
+
+ /* Scale the text to match the pixel size of the photo */
+ scale *= w / 150.0;
+
+# if defined(HAVE_COCOA)
+ scale /= 2;
+ if (MI_WIDTH(mi) > 2560) scale /= 2; /* Retina displays */
+# endif
+
+# if defined(HAVE_MOBILE)
+ scale /= 2;
+# endif
+
+ /* Clip characters off the left end of the string until it fits. */
+ if (clip_p || polaroid_p)
+ while (sw * scale > tw && strlen (title) > 10)
+ {
+ title++;
+ texture_string_metrics (ss->texfont, title, &e, &ascent, &descent);
+ sw = e.width;
+ }