diff --git a/js/CanvasTextWrapper.js b/js/CanvasTextWrapper.js index 95a5423..f7b9283 100644 --- a/js/CanvasTextWrapper.js +++ b/js/CanvasTextWrapper.js @@ -1,10 +1,3 @@ -/*! CanvasTextWrapper - * https://github.com/namniak/CanvasTextWrapper - * Version: 0.4.0 - * MIT License (http://www.opensource.org/licenses/mit-license.html) - */ - - (function (root) { function CanvasTextWrapper(canvas, text, options) { @@ -73,6 +66,7 @@ setFont(--fontSize); lineHeight = fontSize; + wrap(); } else { wrap(); } diff --git a/js/examples.js b/js/examples.js index 673fac1..d29cc2d 100644 --- a/js/examples.js +++ b/js/examples.js @@ -22,7 +22,7 @@ document.onreadystatechange = function() { canvas.width = w; canvas.height = h; context = canvas.getContext('2d'); - context.lineWidth = 2; + context.lineWidth = 1; context.strokeStyle = 'yellow'; CanvasTextWrapper(canvas,(options[i].txt),options[i]); diff --git a/js/options.js b/js/options.js index 7705f26..2bc39d8 100644 --- a/js/options.js +++ b/js/options.js @@ -1,7 +1,7 @@ var model = [ { txt: 'Break text on every next word', - font: 'italic 800 36px Arial, sans-serif', + font: 'italic 800 25px Arial, sans-serif', textAlign: 'center', lineBreak: 'word', lineHeight: "160%"