@@ -10,6 +10,7 @@ Elm.Native.Graphics.Text = function(elm) {
1010 var htmlHeight = Elm.Native.Utils(elm).htmlHeight;
1111 var Color = Elm.Native.Graphics.Color(elm);
1212 var Element = Elm.Graphics.Element(elm);
13+ var show = Elm.Native.Show(elm).show;
1314
1415 function makeSpaces(s) {
1516 if (s.length == 0) { return s; }
@@ -66,6 +67,9 @@ Elm.Native.Graphics.Text = function(elm) {
6667 function typeface(name, text) {
6768 return addStyle('font-family', JS.fromString(name), text);
6869 }
70+ function monospace(text) {
71+ return addStyle('font-family', 'monospace', text);
72+ }
6973 function size(px, text) { return addStyle('font-size', px + 'px', text) }
7074 var header = addTag('h1');
7175 function height(h, text) { return addStyle('font-size', hf+'em', text) }
@@ -94,7 +98,7 @@ Elm.Native.Graphics.Text = function(elm) {
9498 }
9599
96100 function asText(v) {
97− return position('left')(typeface('monospace', toText(show(v))));
101+ return position('left')(monospace(toText(show(v))));
98102 }
99103
100104 return elm.Native.Graphics.Text = {
@@ -107,7 +111,7 @@ Elm.Native.Graphics.Text = function(elm) {
107111 underline : underline,
108112 overline : overline,
109113 strikeThrough : strikeThrough,
110− monospace : function(text) { return typeface('monospace', text) },
114+ monospace : monospace,
111115 typeface : F2(typeface),
112116 color : F2(color),
113117 link : F2(link),