From 84cb3859bd06b730e9c8a57244605512591f6640 Mon Sep 17 00:00:00 2001 From: Peter Date: Sat, 15 Jul 2017 00:36:55 +0200 Subject: [PATCH] This fixed the fonts for me Tested in Chromium 58 and Firefox 54 on Linux --- script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script.js b/script.js index 5c13f5a..fac8336 100644 --- a/script.js +++ b/script.js @@ -160,7 +160,7 @@ function toCanvas(id, text, flagcolors, size, codeproportion, showtext, showcode // your message if (showtext){ - ctx.font = size+"px 'Roboto-Black'"; + ctx.font = 'bold ' + size + "px 'Roboto'"; ctx.textAlign = "center"; ctx.textBaseline= "middle"; //ctx.alignment-baseline = "middle"; @@ -171,7 +171,7 @@ function toCanvas(id, text, flagcolors, size, codeproportion, showtext, showcode if (showcode){ size = size / (codeproportion / 10); minsize = size > 6 ? size : 6; - ctx.font = minsize+"px 'Roboto-Black'"; + ctx.font = 'bold ' + minsize + "px 'Roboto'"; ctx.textAlign = "right" ctx.textBaseline= "alphabetic"; @@ -193,4 +193,4 @@ function defaultText(text){ return; $("input").value = "SHA 2017" hash(); -} \ No newline at end of file +}