diff --git a/graph-editor.js b/graph-editor.js index 7927ee0..eb361e7 100644 --- a/graph-editor.js +++ b/graph-editor.js @@ -18,6 +18,11 @@ window.onload = function() .append("svg:svg") .attr("class", "graphdiagram"); + d3.xhr("/Lato-base64.txt", function(data) { + var result = data.response; + d3.select("#canvas svg").insert("style", "g").html("@font-face { font-family: \"Lato\"; font-style: normal; font-weight: 400; src: url(\"data:font/truetype;charset=utf-8;base64," + result + "\");}"); + }); + var diagram = gd.diagram() .scaling(gd.scaling.centerOrScaleDiagramToFitSvg) .overlay(function(layoutModel, view) { diff --git a/style/graph-style-chunky.css b/style/graph-style-chunky.css index 303148e..803062a 100644 --- a/style/graph-style-chunky.css +++ b/style/graph-style-chunky.css @@ -1,5 +1,5 @@ .graph-diagram-markup { - font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif; + font-family: 'Lato', "Gill Sans", "Gill Sans MT", Calibri, sans-serif; } .graph-diagram-markup .node {