From simon at sleclerc.ca Thu Feb 16 02:19:19 2023 From: simon at sleclerc.ca (Simon Leclerc) Date: Wed, 15 Feb 2023 20:19:19 -0500 Subject: [JWplugins] =?utf-8?q?A_word_on_FCTextMetrics=E2=80=A6?= Message-ID: <31EBF747-1A7E-411D-8B95-B62E31859B7C@sleclerc.ca> Hello to all, I?ve been using FCTextMetrics for a very long time now and I always got good results, well, most of the time. Only recently did I discover that whenever I was loading a text string that was only 1 character long (i.e. dynamics), the resulting data was spot on. But if the string was longer, then some problems occurred. After pushing the analysis a little bit further, loading one character at a time of a longer string and then the whole string, and comparing, I realized that in a string longer than one character (all being of the same font obviously): 1. the method ?GetLeftEVPUs? applied to that long string would actually return the left parameter of the last character of the string. Not the first one. 2. although the Advance data of the whole string was dead on, the calculation of substracting the Advance data of that string from the ?GetRightEVPUs? of that same string would actually return the data related to the first character of the string (as considered alone). Not the last one. Finding the result of that calculation is useful to get the actual graphical ending of a text expression. To me, it seems backwards. After creating a substring for the first character and one for the last character of the string, loading them separately, I could then have access to the true data of the entire string. Beginning to end. I thought it was worth mentioning this to you. Let me know if you get the same results and understanding. P.S. Although I did those tests with RGPLua, the same thing happens with JWLua. ?\_(?)_/? Simon Leclerc