<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="yui_3_16_0_1_1443882347398_9636" dir="ltr">> This becomes more than an aesthetic problem-- for example, if you try to move the cursor,Pd moves it based on Miller's font metrics, not the users.</div><div id="yui_3_16_0_1_1443882347398_9637"><br><span></span></div><div id="yui_3_16_0_1_1443882347398_9908"><span id="yui_3_16_0_1_1443882347398_9909">Actually, I'm not at all certain if its the Pd font metrics.  It may be that the font engine uses different</span></div><div id="yui_3_16_0_1_1443882347398_9910" dir="ltr"><span id="yui_3_16_0_1_1443882347398_9911">inter-line spacing, or that tcl/tk reports the wrong metric, or something else.  The point is that if your <br></span></div><div id="yui_3_16_0_1_1443882347398_9915" dir="ltr"><span id="yui_3_16_0_1_1443882347398_9911">message box is</span><span id="yui_3_16_0_1_1443882347398_9914"> 400 pixels high and the text that fills it is only 380 pixels high, Pd calculates cursor</span></div><div id="yui_3_16_0_1_1443882347398_9916" dir="ltr"><span id="yui_3_16_0_1_1443882347398_9914">position based</span><span id="yui_3_16_0_1_1443882347398_9954"> on the _box_ size.  As you add more lines to the box that discrepancy grows until</span></div><div id="yui_3_16_0_1_1443882347398_10016" dir="ltr"><span id="yui_3_16_0_1_1443882347398_9954">it becomes nearly impossible to move the cursor or select text accurately.</span></div><div id="yui_3_16_0_1_1443882347398_10017" dir="ltr"><br><span id="yui_3_16_0_1_1443882347398_9954"></span></div><div id="yui_3_16_0_1_1443882347398_10018" dir="ltr"><span id="yui_3_16_0_1_1443882347398_9954">-Jonathan</span></div>  <br><div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_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 Saturday, October 3, 2015 12:12 PM, Jonathan Wilkes via Pd-list <pd-list@lists.iem.at> wrote:<br> </font> </div>  <br><br> <div class="y_msg_container"><div id="yiv8742126445"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_3490">What font are you using?<br clear="none"></div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_6384"><br clear="none"></div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_6400">I have to admit that after looking at Pd's font system, I have no idea how it's supposed to</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_3491">work.  There are two hardcoded collections of font metrics-- one in font_fixed_metrics in that</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_4593">tcl file, and another in s_main.c called sys_fontlist.  It looks like the one in the tcl file is used as</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_4811">a point of reference against which tcl/tk can measure the font on the user's system.  But then</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_4816">when you sent those metrics off to Pd, it takes them and compares them _again_, this time</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_5345">against the sys_fontlist min/max x/y values.  That seems unnecessarily complex and prone</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_6121">to error.<br clear="none"></div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_4687"><br clear="none"></div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_5086">And I use "hardcoded" loosely-- for all the "pixel exact" talk wrt Pd-extended, you would think</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_5224">that the sys_fontlist in s_main.c would never change.  Those numbers determine the max size</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_6145">of msg/obj boxes; if you increase the maximum height/width there, then someone's perfectly</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_5657">arranged patch in 0.39 could have overlapping objects in 0.46.  But they've been changed</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_6212">slightly over the years, so I don't think I'm the only one who doesn't understand the system.<br clear="none"></div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_5658"><br clear="none"></div><div id="yiv8742126445yui_3_16_0_1_1443882347398_5659">Additionally, Pd-extended standardized the default font on each platform to be DejaVu Sans Mono.</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_5660">I could be wrong, but I think Miller uses a different font.  The main place this becomes a problem</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_6072">is with multi-line message boxes.  Typically, you end up with a bunch of extra space at the bottom</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_5873">of the box.  (And tcl/tk doesn't let you control the spaces between lines of text so there's no way</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_5916">to fix it.)  This becomes more than an aesthetic problem-- for example, if you try to move the cursor,</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_5986">Pd moves it based on Miller's font metrics, not the users.  This means that for large message boxes,</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_6008">when a Pd-extended user tries to select a line of text it will select the text a line or two above that.</div><div id="yiv8742126445yui_3_16_0_1_1443882347398_5661"><br clear="none"></div><div id="yiv8742126445yui_3_16_0_1_1443882347398_6358">At the moment, I've got DejaVu Sans Mono perfectly size to fit Miller's sys_fontlist in the GUI</div><div id="yiv8742126445yui_3_16_0_1_1443882347398_6506">port.  One of the side effects is that the characters of the font itself are noticeably larger than</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_6507">they are in Pd-Vanilla.  For example, [get] in my port will touch the top of the outlet with the bottom</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_6509">of the "g" character.  I've found that making the xlets light gray is a decent compromise, and that</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_6943">things are generally more readable.  (I'm also not using bold typeface.)</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_6944"><br clear="none"></div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_7070">I was also going to try Droid Sans Mono Dotted because I read that it covers CJK characters.</div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_7071">But in my tests it looks like DejaVu does as well, so I haven't done that.<br clear="none"></div><div id="yiv8742126445yui_3_16_0_1_1443882347398_7072"><br clear="none"></div><div dir="ltr" id="yiv8742126445yui_3_16_0_1_1443882347398_5662">-Jonathan<br clear="none"></div><div> <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 class="yiv8742126445qtdSeparateBR"><br clear="none"><br clear="none"></div><div class="yiv8742126445yqt0982376467" id="yiv8742126445yqtfd66998"><div class="yiv8742126445yqt4756005654" id="yiv8742126445yqtfd76106"><div dir="ltr"> <font face="Arial" size="2"> On Saturday, October 3, 2015 2:24 AM, Roman Haefeli <reduzent@gmail.com> wrote:<br clear="none"> </font> </div>  <br clear="none"><br clear="none"> <div class="yiv8742126445y_msg_container">Only after having access to more Windows virtual machines, I realize<br clear="none">this is an issue only on _one_ Windows machine (unfortunately, the one I<br clear="none">did the most of the testing with). <br clear="none"><br clear="none">Sorry for the noise (that caused no reaction anyway).<br clear="none"><br clear="none">Roman<br clear="none"><div class="yiv8742126445yqt4521006272" id="yiv8742126445yqtfd43571"><br clear="none">On Don, 2015-09-10 at 14:43 +0200, Roman Haefeli wrote:<br clear="none">> Hi all<br clear="none">> <br clear="none">> It's old news, but deken makes Pd-vanilla _the_ target platform and I do<br clear="none">> care about portability:<br clear="none">> <br clear="none">>   Font sizes in canvasses are different between Linux and Windows.<br clear="none">> <br clear="none">> Some patches created on Linux break on Windows because symbol boxes are<br clear="none">> overlapping the GOP area and are not visible anymore. <br clear="none">> <br clear="none">> From the list of available sizes in the 'Edit'->'Font' menu, only a few<br clear="none">> sizes are actually affected. The sizes 8, 10 and 12 are one pixel per<br clear="none">> character wider on Windows than on Linux. The sizes 16, 24 and 36 are<br clear="none">> OK.<br clear="none">> <br clear="none">> Now the question is what is the correct way to fix that, I mean on what<br clear="none">> platform should it be changed? I'd say it should be changed on Windows,<br clear="none">> because I can't imagine that shrinking boxes would break any patches,<br clear="none">> while widening boxes might do. <br clear="none">> <br clear="none">> Pd-extended already dealt with the issue and apparently found a fix.<br clear="none">> What would speak against incorporating that fix into Pd?<br clear="none">> <br clear="none">> Roman<br clear="none">>  <br clear="none"></div><br clear="none"><div class="yiv8742126445yqt4521006272" id="yiv8742126445yqtfd58267">_______________________________________________<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 -> <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"></div><br clear="none"><br clear="none"></div>  </div></div></div><div class="yiv8742126445yqt4756005654" id="yiv8742126445yqtfd78594"><div class="yiv8742126445yqt0982376467" id="yiv8742126445yqtfd53141"> </div></div></div><div class="yiv8742126445yqt4756005654" id="yiv8742126445yqtfd91570"><div class="yiv8742126445yqt0982376467" id="yiv8742126445yqtfd71803">  </div></div></div></div></div></div><br><div class="yqt4756005654" id="yqtfd74218">_______________________________________________<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="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br clear="none"></div><br><br></div>  </div> </div>  </div></div></body></html>