diff --git a/lib/forcegraph.js b/lib/forcegraph.js index ff94495..cb9d05e 100644 --- a/lib/forcegraph.js +++ b/lib/forcegraph.js @@ -701,11 +701,12 @@ define(["d3", "helper"], function (d3, helper) { var buffer = document.createElement("canvas"); var r = window.devicePixelRatio; var bctx = buffer.getContext("2d"); - bctx.font = "11px Roboto"; + bctx.font = "11px Roboto, sans-serif"; var width = bctx.measureText(name).width; var scale = zoomBehavior.scaleExtent()[1] * r; buffer.width = (width + 2 * lineWidth) * scale; buffer.height = (16 + 2 * lineWidth) * scale; + bctx.font = "11px Roboto, sans-serif"; bctx.scale(scale, scale); bctx.textBaseline = "middle"; bctx.textAlign = "center"; diff --git a/lib/map/labelslayer.js b/lib/map/labelslayer.js index d54c4af..e525d65 100644 --- a/lib/map/labelslayer.js +++ b/lib/map/labelslayer.js @@ -11,7 +11,7 @@ define(["leaflet", "rbush"], ["center", "ideographic", 2 / 8], ["right", "ideographic", 3 / 8]]; - var fontFamily = "Roboto"; + var fontFamily = "Roboto, sans-serif"; var nodeRadius = 4; var ctx = document.createElement("canvas").getContext("2d");