<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hi Robert,<div><br></div><div>Personally, I would modify the function so it returns the true value and add a note in the docs.</div><div><br></div><div>My 2 cents.<br><div>
<meta charset="UTF-8"><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><span class="Apple-style-span" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; orphans: 2; widows: 2; border-collapse: separate; border-spacing: 0px; -webkit-text-decorations-in-effect: none;"><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><div><span style="font-style: normal;"><br class="Apple-interchange-newline"><br></span></div><div><span style="font-style: normal;"><br></span></div><div><span style="font-style: normal;"><br></span></div><div><span style="font-style: normal;"><br></span></div><div style="font-family: Helvetica; font-style: normal; font-weight: normal; font-size: 12px;"><span style="text-align: -webkit-auto; -webkit-text-decorations-in-effect: none; font-family: "Times New Roman", serif; font-size: 16px;">¯\_(</span><span style="text-align: -webkit-auto; -webkit-text-decorations-in-effect: none; font-family: "MS Gothic"; font-size: 16px;">ツ</span><span style="text-align: -webkit-auto; -webkit-text-decorations-in-effect: none; font-family: "Times New Roman", serif; font-size: 16px;">)_/¯</span></div><div style="font-family: Helvetica; font-style: normal; font-weight: normal; font-size: 12px;"><span class="Apple-style-span" style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; border-collapse: separate; border-spacing: 0px; -webkit-text-decorations-in-effect: none;"><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><br></div><div>Simon Leclerc</div><div>60, Mirabelle</div><div>Ste-Agathe-des-Monts, Québec</div><div>J8C 0W9</div><div>simon@sleclerc.ca</div></div></span></div></div><div style="font-family: Helvetica; font-style: normal; font-weight: normal; font-size: 12px;"><br></div></div></span><br class="Apple-interchange-newline" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; orphans: 2; widows: 2;"><br class="Apple-interchange-newline" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"></div></div>
</div>
<div><br><blockquote type="cite"><div>On Sep 17, 2023, at 22:57, Robert Patterson <robert@robertgpatterson.com> wrote:</div><br class="Apple-interchange-newline"><div><div dir="ltr"><div>Hello List,</div><div><br></div><div>I have just discovered that GetAdvanceWidthPoints is misnamed. The unit is actually being returned is a platform-dependent value that may be the pixel width. (On macOS it is actually points, but on Windows it is something else wildly other than points.)</div><div><br></div><div>To get actual 72 dpi points, you need to divide GetAdvanceWidthEVPUs by 4. This will give the correct value on both platforms. My question for this group is how to mitigate/address this bug.</div><ul><li>At a minimum, I could add a warning in the docs.</li><li>I could rename the function to match what it returns.</li><li>I could modify the function to actually return 72 dpi points.</li></ul><div>What is the wisest approach?</div><div><br></div></div>
_______________________________________________<br>JWLua mailing list<br>JWLua@jwmusic.nu<br>http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu<br></div></blockquote></div><br></div></body></html>