diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js index 80664e7afaae85cd519d5dc1f195b84f6ac44cd5..66d609472cda4e83811b978aece41cfa266fb5ca 100644 --- a/pd/nw/pdgui.js +++ b/pd/nw/pdgui.js @@ -1537,6 +1537,19 @@ function gui_atom_draw_border(cid, tag, width, height) { g.appendChild(polygon); } +function gui_atom_redraw_border(cid, tag, width, height) { + var g = get_gobj(cid, tag), + p = g.querySelector("polygon"); + // When creating a new gatom, the C code sends messages + // to redraw the border before the border exists. + // So we have to check for existence here... + if (p) { + configure_item(p, { + points: atom_border_points(width, height) + }); + } +} + // draw a patch cord function gui_canvas_line(cid,tag,type,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10) { var svg = get_item(cid, "patchsvg"), @@ -1715,7 +1728,7 @@ function gui_text_new(canvasname, myname, type, isselected, left_margin, font_he // text is handled under tk... // 'dominant-baseline': 'hanging', "shape-rendering": "crispEdges", - "font-size": pd_fontsize_to_gui_fontsize(font) + "px", + "font-size": (pd_fontsize_to_gui_fontsize(font) === 11.65 ? 12 : pd_fontsize_to_gui_fontsize(font)) + "px", "font-weight": "normal", id: myname + "text", "class": "box_text" diff --git a/pd/src/g_text.c b/pd/src/g_text.c index 854b6230572c8992971593696d72eae3bcf7f7e9..9aa6a6bd0faf6d5d89dd01c926c7a48c41f03660 100644 --- a/pd/src/g_text.c +++ b/pd/src/g_text.c @@ -2273,6 +2273,11 @@ void text_drawborder(t_text *x, t_glist *glist, // "%d %d %d %d %d %d %d %d %d %d %d %d\n", // glist_getcanvas(glist), tag, // x1, y1, x2-4, y1, x2, y1+4, x2, y2, x1, y2, x1, y1); + gui_vmess("gui_atom_redraw_border", "xsii", + glist_getcanvas(glist), + tag, + x2 - x1, + y2 - y1); } } /* for comments, just draw a dotted rectangle unlocked; when a visible