Patches item #3289212, was opened at 2011-04-18 23:39 Message generated for change (Comment added) made by eighthave You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3289212...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: puredata Group: bugfix Status: Open Resolution: None Priority: 5 Private: No Submitted By: Kan-Ru Chen (kanru) Assigned to: Nobody/Anonymous (nobody) Summary: Move text drawing routine to tcl
Initial Comment: It's best let tcl to figure out how to draw text and the border box. This should fix non-latin text drawing like Chinese.
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave)
Date: 2011-04-19 00:35
Message: This patch is definitely the right approach going forward (instead of generating Tcl commands on the C-side, calling Tcl procs from C). Part of the problem though is that the mouse tracking is still handled on the C-side, and this patch makes the boxes smaller than the original size. Therefore if you clikc just above or below the box, Pd still uses the old measurements (now in pd-gui.tcl) as the basis for determining what was clicked on, and you'll get the menu for that object that was just below where the mouse clicked rather than the menu for the canvas that was just clicked.
I think this patch could be useful now if it used the box measurements in pd-gui.tcl, and then fit the font into them. As for the bug with the Chinese text not fitting in the boxes, my guess is that its related to the UTF-8 code, something like each chinese character is made up of multiple bytes, and some piece of code is still measuring one character equals one byte.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3289212...