From 75e8f61fec8351dbf4ad3ef69e85954d8db8a343 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Fri, 14 Aug 2015 15:50:27 +0200 Subject: [PATCH] changed main font to Droid Sans --- lib/captcha.js | 10 +++++----- public/css/style.css | 3 ++- views/layout.jade | 1 + 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/captcha.js b/lib/captcha.js index 7d89d6b..adba350 100644 --- a/lib/captcha.js +++ b/lib/captcha.js @@ -13,7 +13,7 @@ var canvas = require('canvas') function Captcha() { this.code = ''; - this.canvas = new canvas(64, 26); + this.canvas = new canvas(74, 26); this.initialize(); } @@ -29,12 +29,12 @@ Captcha.prototype.initialize = function() { var ctx = this.canvas.getContext('2d'); ctx.fillStyle = '#DDDDDD'; - ctx.fillRect(0, 0, 64, 26); - ctx.font = 'bold 20px Helvetica'; + ctx.fillRect(0, 0, 74, 26); + ctx.font = '20px DroidSans'; ctx.lineWidth = 1; ctx.textAlign = 'center'; - ctx.strokeStyle = '#080'; - ctx.strokeText(this.code, 31, 20); + ctx.fillStyle = '#080'; + ctx.fillText(this.code, 36, 20); ctx.save(); }; diff --git a/public/css/style.css b/public/css/style.css index 5d6cc7f..487b050 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -9,6 +9,7 @@ } body { background: url('/static/img/bg.jpg') repeat-x scroll 0 0 #F5F6F7; + font-family: 'Droid Sans', Helvetica, Arial, sans-serif; padding-top: 45px; } section { @@ -112,7 +113,7 @@ form .clearfix { width: 122px; } #captcha { - margin-right: 20px; + margin-right: 10px; } .page-header { padding: 0; diff --git a/views/layout.jade b/views/layout.jade index 72724eb..574fd0c 100644 --- a/views/layout.jade +++ b/views/layout.jade @@ -10,6 +10,7 @@ html meta(property="og:title", content="binb") meta(property="og:type", content="game") meta(property="og:url", content="https://binb.co/") + link(href="//fonts.googleapis.com/css?family=Droid+Sans:400,700", rel="stylesheet") link(href="/static/css/bootstrap.min.css", rel="stylesheet") link(href="/static/css/style.css", rel="stylesheet") script. -- 2.54.0