From a6cfec4de4fa0c4ca15384212709c05d3d1367df Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes <jon.w.wilkes@gmail.com> Date: Mon, 14 Sep 2015 22:32:59 -0400 Subject: [PATCH] fix bug setting font for drawnumber/symbol use correct y-offset for font positioning --- pd/nw/pdgui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js index 435724e07..a05f8bd51 100644 --- a/pd/nw/pdgui.js +++ b/pd/nw/pdgui.js @@ -2240,12 +2240,12 @@ function gui_drawnumber_vis(cid, parent_tag, tag, x, y, scale_x, scale_y, // the x attribute, see comment in gui_text_new transform: 'scale(' + scale_x + ',' + scale_y + ') ' + 'translate(' + x + ')', - y: y, + y: y + fontsize, // Turns out we can't do 'hanging' baseline because it's borked // when scaled. Bummer... // 'dominant-baseline': 'hanging', 'shape-rendering': 'optimizeSpeed', - 'font-size': font + 'px', + 'font-size': fontsize + 'px', fill: fontcolor, visibility: visibility === 1 ? 'normal' : 'hidden', id: tag -- GitLab