You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following problem, when I am using bbox()-es for some calculations, in my node.js environment it returns only zeros (although in web it works well)
this is my minimal reproduction:
config.setFontDir("src/fonts/Roboto");config.setFontFamilyMappings({Roboto: "Roboto-Black.ttf","sans-serif": "Roboto-Black.ttf","Roboto-Bold": "Roboto-Bold.ttf",});config.preloadFonts();constwindow=createSVGWindow();const{ document }=window;registerWindow(window,document);constdraw=SVG(document.documentElement);draw.attr({width: 200,height: 200,});constgroup=draw.group().id(`txtGroup-example`);consttextELem=group.text("label").fill("red").attr({x: 50,y: 50,"text-anchor": "middle","dominant-baseline": "auto",transform: `rotate(${90},${50},${50})`,"font-size": `${16}px`,"font-family": `Roboto`,});constbbox=textELem.bbox();console.log("group :>> ",bbox);//every element inside bbox will be zero
Am I doing something wrong ?
Thanks
The text was updated successfully, but these errors were encountered:
Hi,
I have the following problem, when I am using bbox()-es for some calculations, in my node.js environment it returns only zeros (although in web it works well)
this is my minimal reproduction:
Am I doing something wrong ?
Thanks
The text was updated successfully, but these errors were encountered: