<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yiv2226465404"><div id="yui_3_16_0_1_1444308954576_11667"><div id="yui_3_16_0_1_1444308954576_11666" style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"><div dir="ltr" id="yiv2226465404yui_3_16_0_1_1444308954576_8063">Four things:</div><div dir="ltr" id="yiv2226465404yui_3_16_0_1_1444308954576_8065">1) The font dialog shouldn't use numbers.  It should say "tiny", "small", "medium", etc. because those numbers just mislead the user.<br clear="none"></div><div dir="ltr" id="yiv2226465404yui_3_16_0_1_1444308954576_8069"><br clear="none"></div><div dir="ltr" id="yiv2226465404yui_3_16_0_1_1444308954576_8167">2)  Font dialog number "10" in Vanilla may correspond to any font size that has</div><div dir="ltr" id="yiv2226465404yui_3_16_0_1_1444308954576_8513">a width less than or equal to 7 pixels (and height <= 13).  That includes DejaVu Sans Mono at pixel size 11 on Raspbian.  Since the text fits in the box in your screenshot we can tell Tk is measuring the actual font correctly.  (Well, more or</div><div dir="ltr" id="yiv2226465404yui_3_16_0_1_1444308954576_9197">less-- what happens with a message box that has, say 50 lines?).</div><div dir="ltr" id="yiv2226465404yui_3_16_0_1_1444308954576_8468"><br clear="none"></div><div dir="ltr" id="yiv2226465404yui_3_16_0_1_1444308954576_8631">3) I can't figure out how pd_font_10 ends up with pixel size "11".<br clear="none"></div><div dir="ltr" id="yiv2226465404yui_3_16_0_1_1444308954576_8565"><br clear="none"></div><div dir="ltr" id="yiv2226465404yui_3_16_0_1_1444308954576_9302">4) There are only two ways I can think of to fix this problem.  One is to always</div><div dir="ltr" id="yiv2226465404yui_3_16_0_1_1444308954576_9348">size boxes according to fi_maxwidth and fi_maxheight.  The other is to forgo <br clear="none"></div><div dir="ltr" id="yiv2226465404yui_3_16_0_1_1444308954576_9660">the automated metrics and brute-force it so that DejaVu Sans Mono fits exactly</div><div dir="ltr" id="yiv2226465404yui_3_16_0_1_1444308954576_9851">into the hardcoded metrics of s_main.c.  I chose the 2nd solution in the GUI <br clear="none"></div><div dir="ltr" id="yiv2226465404yui_3_16_0_1_1444308954576_10082">port, but only because I have decimal pixel sizes to choose from.  Tcl/tk doesn't <br clear="none"></div><div dir="ltr" id="yiv2226465404yui_3_16_0_1_1444308954576_10084">let you do that.</div><div dir="ltr" id="yiv2226465404yui_3_16_0_1_1444308954576_10086"><br clear="none"></div><div dir="ltr" id="yiv2226465404yui_3_16_0_1_1444308954576_9954">I'll check again but I think my method looks fine on Raspbian as well as Ubuntu.</div><div dir="ltr" id="yiv2226465404yui_3_16_0_1_1444308954576_10013"><div id="yui_3_16_0_1_1444308954576_11677"><br></div><div id="yui_3_16_0_1_1444308954576_11968">I also played around with Droid Sans Mono Dotted because it has CJK <br></div><div dir="ltr" id="yui_3_16_0_1_1444308954576_11713">characters.  But DejaVu Sans Mono evidently has them, too-- or at least when</div><div id="yui_3_16_0_1_1444308954576_11752" dir="ltr">I copy/paste them they show up correctly.  (Perhaps there's some kind of <br></div><div id="yui_3_16_0_1_1444308954576_11821" dir="ltr">fallback mechanism that I'm not seeing.)  Those characters open up a <br></div><div id="yui_3_16_0_1_1444308954576_11822" dir="ltr">wellspring of new problems.  They are referred to as "full width", but take <br></div><div id="yui_3_16_0_1_1444308954576_11890" dir="ltr">up something like 1.5x width of ascii characters.  If you use them in <br></div><div id="yui_3_16_0_1_1444308954576_11928" dir="ltr">any flavor of Pd they overflow the object/message box borders.<br></div><div id="yui_3_16_0_1_1444308954576_11751"><br clear="none"></div></div><div dir="ltr" id="yiv2226465404yui_3_16_0_1_1444308954576_10015">-Jonathan<br clear="none"></div><div id="yiv2226465404yui_3_16_0_1_1444308954576_7060"><span></span></div>  <br clear="none"><div class="yiv2226465404qtdSeparateBR"><br clear="none"><br clear="none"></div><div class="yiv2226465404yqt9164568357" id="yiv2226465404yqt95603"></div></div></div></div><div class=".yiv2226465404yahoo_quoted"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div dir="ltr"> <font face="Arial" size="2"> On Thursday, October 8, 2015 2:53 AM, katja <katjavetter@gmail.com> wrote:<br clear="none"> </font> </div>  <br clear="none"><br clear="none"> <div class="yiv2226465404y_msg_container">On Thu, Oct 8, 2015 at 12:23 AM, Jonathan Wilkes <<a rel="nofollow" shape="rect" ymailto="mailto:jancsika@yahoo.com" target="_blank" href="mailto:jancsika@yahoo.com">jancsika@yahoo.com</a>> wrote:<br clear="none">> Ok, try this in place of the command that was giving the error:<br clear="none">> pdtk_post "rank tk speculation follows: [font actual [get_font_for_size<br clear="none">> $font_size] -displayof $tkcanvas]\n"<br clear="none">><br clear="none"><br clear="none">There you got it, inspector Wilkes! For Xubuntu the output is:<br clear="none"><br clear="none">rank tk speculation follows: -family {DejaVu Sans Mono} -size -10<br clear="none">-weight normal -slant roman -underline 0 -overstrike 0<br clear="none"><br clear="none">For Raspbian:<br clear="none"><br clear="none">rank tk speculation follows: -family {DejaVu Sans Mono} -size -11<br clear="none">-weight normal -slant roman -underline 0 -overstrike 0<br clear="none"><br clear="none">In both cases the font size menu says "10".<div class="yiv2226465404yqt0070253940" id="yiv2226465404yqtfd42551"><br clear="none"><br clear="none">><br clear="none">><br clear="none">><br clear="none">><br clear="none">><br clear="none">><br clear="none">><br clear="none">><br clear="none">><br clear="none">><br clear="none">><br clear="none">> On Wednesday, October 7, 2015 4:33 PM, Jonathan Wilkes via Pd-list<br clear="none">> <<a rel="nofollow" shape="rect" ymailto="mailto:pd-list@lists.iem.at" target="_blank" href="mailto:pd-list@lists.iem.at">pd-list@lists.iem.at</a>> wrote:<br clear="none">><br clear="none">><br clear="none">> Sorry, I thought that would work.  I'll sit down and wade through all the<br clear="none">> indirection later to get a working debug printout.<br clear="none">><br clear="none">> -Jonathan<br clear="none">><br clear="none">><br clear="none">><br clear="none">> On Wednesday, October 7, 2015 4:26 PM, katja <<a rel="nofollow" shape="rect" ymailto="mailto:katjavetter@gmail.com" target="_blank" href="mailto:katjavetter@gmail.com">katjavetter@gmail.com</a>> wrote:<br clear="none">><br clear="none">><br clear="none">> On Wed, Oct 7, 2015 at 9:40 PM, Jonathan Wilkes <<a rel="nofollow" shape="rect" ymailto="mailto:jancsika@yahoo.com" target="_blank" href="mailto:jancsika@yahoo.com">jancsika@yahoo.com</a>> wrote:<br clear="none">>> For the official record-- I'm holding my tongue, in the hopes that when<br clear="none">>> others look at the code<br clear="none">>> in my GUI port they'll practice similar restraint.<br clear="none">>><br clear="none">>> Ok, add this:<br clear="none">>><br clear="none">>> pdtk_post "for real this time-- the actual font we are sending to tk is:<br clear="none">>> [set [get_font_for_size $font_size]]\n"<br clear="none">><br clear="none">> Pd list is now looking at a line that doesn't work. The error is:<br clear="none">><br clear="none">> can't read "::pd_font_10": no such variable<br clear="none">><br clear="none">><br clear="none">><br clear="none">><br clear="none">>> -Jonathan<br clear="none">>><br clear="none">>><br clear="none">>><br clear="none">>><br clear="none">>><br clear="none">>><br clear="none">>> On Wednesday, October 7, 2015 3:19 PM, katja <<a rel="nofollow" shape="rect" ymailto="mailto:katjavetter@gmail.com" target="_blank" href="mailto:katjavetter@gmail.com">katjavetter@gmail.com</a>><br clear="none">>> wrote:<br clear="none">>><br clear="none">>><br clear="none">>> On Wed, Oct 7, 2015 at 8:37 PM, Jonathan Wilkes <<a rel="nofollow" shape="rect" ymailto="mailto:jancsika@yahoo.com" target="_blank" href="mailto:jancsika@yahoo.com">jancsika@yahoo.com</a>><br clear="none">>> wrote:<br clear="none">>>> Silly me, I forgot this is Pd so it has to be way more complex than<br clear="none">>>> that...<br clear="none">>>><br clear="none">>>> Add this line to pdtk_text_new in pdtk_text.tcl:<br clear="none">>>><br clear="none">>>> pdtk_post "the actual font we are sending to tk is: [get_font_for_size<br clear="none">>>> $font_size]\n"<br clear="none">>>><br clear="none">>>> Now do the test I mentioned before.<br clear="none">>><br clear="none">>> The answer is in both cases:<br clear="none">>><br clear="none">>> "the actual font we are sending to tk is: ::pd_font_10"<br clear="none">>><br clear="none">>><br clear="none">>><br clear="none">>>> -Jonathan<br clear="none">>>><br clear="none">>>><br clear="none">>>><br clear="none">>>> On Wednesday, October 7, 2015 2:16 PM, Jonathan Wilkes via Pd-list<br clear="none">>>> <<a rel="nofollow" shape="rect" ymailto="mailto:pd-list@lists.iem.at" target="_blank" href="mailto:pd-list@lists.iem.at">pd-list@lists.iem.at</a>> wrote:<br clear="none">>>><br clear="none">>>><br clear="none">>>> Hi katja,<br clear="none">>>><br clear="none">>>> Could you do a test?  Make a simple patch with a single object in it, and<br clear="none">>>> use the same canvas font size you did above.  Then run Pd with -d 3 flag<br clear="none">>>> and<br clear="none">>>> see what font size is actually being sent from Pd to the GUI on each<br clear="none">>>> distro.<br clear="none">>>><br clear="none">>>> -Jonathan<br clear="none">>>><br clear="none">>>><br clear="none">>>><br clear="none">>>><br clear="none">>>><br clear="none">>>> On Wednesday, October 7, 2015 12:28 PM, katja <<a rel="nofollow" shape="rect" ymailto="mailto:katjavetter@gmail.com" target="_blank" href="mailto:katjavetter@gmail.com">katjavetter@gmail.com</a>><br clear="none">>>> wrote:<br clear="none">>>><br clear="none">>>><br clear="none">>>> Hello,<br clear="none">>>><br clear="none">>>> A particular font size issue can be observed in vanilla Pd and package<br clear="none">>>> puredata on Raspbian Wheezy and Jessie: font size 10 is larger for<br clear="none">>>> object boxes, message boxes and comments than for IEM guis (bang,<br clear="none">>>> toggle, slider, radio button, canvas). Object/message/comment<br clear="none">>>> characters are too large in number of pixels. When Edit > Font > Font<br clear="none">>>> Size is set to 8, their size is identical to IEM gui font size 10.<br clear="none">>>> This inconsistency does not happen for me on Xubuntu. A test patch and<br clear="none">>>> two screenshots are attached for illustration.<br clear="none">>>><br clear="none">>>> For IEM guis, font size 10 translates to 6 pixels per character on<br clear="none">>>> both systems, given the default font type DejaVu Sans Mono. For object<br clear="none">>>> boxes, message boxes and comments, font size 10 is 6 pixels on Xubuntu<br clear="none">>>> and almost 7 pixels on Raspbian.<br clear="none">>>><br clear="none">>>> I don't know if this issue is related to font size effects on Windows<br clear="none">>>> as described by Roman in another thread. In any case, consequences are<br clear="none">>>> similar: patches created on Xubuntu tend to look messy on Raspbian,<br clear="none">>>> sometimes with overlapping texts. With XFCE (Xubuntu's default desktop<br clear="none">>>> environment) installed on Raspbian the issue still persists. Custom<br clear="none">>>> dpi setting has no effect on Pd. What else might cause the difference<br clear="none">>>> in behavior on those systems?<br clear="none">>>><br clear="none">>>> Katja<br clear="none">>>><br clear="none">>>> _______________________________________________<br clear="none">>>> <a rel="nofollow" shape="rect" ymailto="mailto:Pd-list@lists.iem.at" target="_blank" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br clear="none">>>> UNSUBSCRIBE and account-management -><br clear="none">>>> <a rel="nofollow" shape="rect" target="_blank" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a><br clear="none">>>><br clear="none">>>><br clear="none">>>><br clear="none">>>> _______________________________________________<br clear="none">>>> <a rel="nofollow" shape="rect" ymailto="mailto:Pd-list@lists.iem.at" target="_blank" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br clear="none">>>> UNSUBSCRIBE and account-management -><br clear="none">>>> <a rel="nofollow" shape="rect" target="_blank" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a><br clear="none">>>><br clear="none">>>><br clear="none">>><br clear="none">>><br clear="none">><br clear="none">><br clear="none">><br clear="none">> _______________________________________________<br clear="none">> <a rel="nofollow" shape="rect" ymailto="mailto:Pd-list@lists.iem.at" target="_blank" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br clear="none">> UNSUBSCRIBE and account-management -><br clear="none">> <a rel="nofollow" shape="rect" target="_blank" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a><br clear="none">><br clear="none">><br clear="none"></div><br clear="none"><br clear="none"></div>  </div> </div>  </div></div></body></html>