<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px">> I could be wrong but I believe that when you ask for a negative font size<br clear="none"><div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1487174411023_19822" style="display: block;"><div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1487174411023_19821"><div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1487174411023_19820"><div class="y_msg_container" id="yui_3_16_0_ym19_1_1487174411023_19823">that inhibits scaling... so the line in pd-gui.tcl:<br clear="none"><div id="yui_3_16_0_ym19_1_1487174411023_19882"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1487174411023_22628">negative font-size numbers in tk mean pixel sizing instead of point sizing.</div><div dir="ltr"><br></div>> set foo [list $::font_family -$fsize bold]<br clear="none"><br clear="none"><div>> is asking for pixel-deterministic font sizes.</div><div><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1487174411023_22340">Pixel sizes do not guarantee that the text will fit into a particular pixel-based sizing spec.<br id="yui_3_16_0_ym19_1_1487174411023_22341"></div><br clear="none">> I think that TCL/TK 8.6 is in fact misrepresenting the true font size by 1<br clear="none">pixel.  What I don't know is whether to throw in a workaround (test for<br clear="none">TCL version and adjust ifit's 8.6???) or to try to dig up the problem in<br clear="none"><div>tcl/tk itself...</div><div><br></div><div>Determine the sizes for object and message <br></div><div>boxes using fontspec heights/widths instead of the ones particular to the font <br></div><div dir="ltr">tcl/tk measured.  Otherwise users will not be able to tell the difference between <br></div><div dir="ltr">a font-rendering bug on their system and a patch where the author happened <br></div><div dir="ltr">to create collisions.</div><div dir="ltr"><br></div><div dir="ltr">-Jonathan<br></div><br clear="none">> cheers<br clear="none">> Miller<br clear="none"><br clear="none">On Wed, Feb 15, 2017 at 12:52:00AM -0700, Dan Wilcox wrote:<br clear="none">> On further digging, I think the culprit is a slightly different tk scaling value:<br clear="none">> <br clear="none">> Tk 8.4 -> scaling: 0.999016715831<br clear="none">> <br clear="none">> Tk 8.6 -> scaling: 0.9990167158308751<br clear="none">> <br clear="none">> Looks like a precision/rounding issue after all w/ 11 digits versus 17.<br clear="none">> <br clear="none">> > On Feb 15, 2017, at 12:16 AM, Dan Wilcox <<a shape="rect" ymailto="mailto:danomatika@gmail.com" href="mailto:danomatika@gmail.com">danomatika@gmail.com</a>> wrote:<br clear="none">> > <br clear="none">> > Looks like you’re right. I checked the debug output of the fit_font_into_metrics proc:<br clear="none">> > <br clear="none">> > In Tk 8.4 with Monaco, I get<br clear="none">> > <br clear="none">> > 6 4 7<br clear="none">> > 7 4 9<br clear="none">> > 8 5 10<br clear="none">> > 9 7 11<br clear="none">> > 10 6 13<br clear="none">> > …<br clear="none">> > <br clear="none">> > And in Tk 8.6:<br clear="none">> > <br clear="none">> > 6 4 9<br clear="none">> > 7 5 10<br clear="none">> > 8 5 11<br clear="none">> > 9 6 12<br clear="none">> > 10 7 14<br clear="none">> > …<br clear="none">> > <br clear="none">> > I wonder if this is a rounding error?<br clear="none">> > <br clear="none">> >> On Feb 12, 2017, at 9:20 AM, Miller Puckette <<a shape="rect" ymailto="mailto:msp@ucsd.edu" href="mailto:msp@ucsd.edu">msp@ucsd.edu</a> <mailto:<a shape="rect" ymailto="mailto:msp@ucsd.edu" href="mailto:msp@ucsd.edu">msp@ucsd.edu</a>>> wrote:<br clear="none">> >> <br clear="none">> >> About that padding - the Tcl code sends Pd the font metrics on startup, and<br clear="none">> >> Pd follows them in setting the dimensions of boxes.  So I guess the new version<br clear="none">> >> of Tcl/Tk is overstating the font width by one pixel.  Perhaps height is also<br clear="none">> >> wrong in the same way (make a mesages box with 20-ish lines in it and see if the box<br clear="none">> >> is 20 pixels too tall).<br clear="none">> >> <br clear="none">> >> cheers<br clear="none">> >> M<br clear="none">> >> <br clear="none">> >> On Sun, Feb 12, 2017 at 02:39:32AM -0700, Dan Wilcox wrote:<br clear="none">> >>> As for comparisons, here’s the same patch using Deja Vu Sans Mono and Monaco, both with Tk 8.4 & with Tk 8.6 Retina HiDPI rendering: <a shape="rect" href="https://flic.kr/p/QLGphN" target="_blank">https://flic.kr/p/QLGphN </a><<a shape="rect" href="https://flic.kr/p/QLGphN" target="_blank">https://flic.kr/p/QLGphN</a>> <<a shape="rect" href="https://flic.kr/p/QLGphN" target="_blank">https://flic.kr/p/QLGphN </a><<a shape="rect" href="https://flic.kr/p/QLGphN" target="_blank">https://flic.kr/p/QLGphN</a>>> (zoom in or download & view at full size)<br clear="none">> >>> <br clear="none">> >>> Jonathan: One of the remaining problems I have with the Tk 8.6 build is the padding added to the object box width in HiDPI. Any clues on what to look into to fix this? The object arguments are clearly the same width… or appear to be.<br clear="none">> >>> <br clear="none">> <br clear="none">> --------<br clear="none">> Dan Wilcox<br clear="none">> @danomatika <<a shape="rect" href="http://twitter.com/danomatika" target="_blank">http://twitter.com/danomatika</a>><br clear="none">> danomatika.com <<a shape="rect" href="http://danomatika.com/" target="_blank">http://danomatika.com/</a>><br clear="none">> robotcowboy.com <<a shape="rect" href="http://robotcowboy.com/" target="_blank">http://robotcowboy.com/</a>><div class="yqt2889581015" id="yqtfd72512"><br clear="none">> <br clear="none">> <br clear="none">> <br clear="none"><br clear="none">_______________________________________________<br clear="none"><a shape="rect" ymailto="mailto:Pd-list@lists.iem.at" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br clear="none">UNSUBSCRIBE and account-management -> <a shape="rect" href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a><br clear="none"></div><br><br></div> </div> </div>  </div></div></body></html>