From 8c34aebc7afc86d9dde35b46c52b2d9a0dde1abe Mon Sep 17 00:00:00 2001
From: MoyuScript <i@moyu.moe>
Date: Sun, 25 Nov 2012 23:48:08 +0200
Subject: [PATCH] moved examples

---
 build.xml                                     | 167 ------------------
 bookmarklet.html => examples/bookmarklet.html |   0
 demo.html => examples/demo.html               |   0
 demo2.html => examples/demo2.html             |   0
 demo3.html => examples/demo3.html             |   0
 src/Parse.js                                  |   2 +-
 6 files changed, 1 insertion(+), 168 deletions(-)
 delete mode 100644 build.xml
 rename bookmarklet.html => examples/bookmarklet.html (100%)
 rename demo.html => examples/demo.html (100%)
 rename demo2.html => examples/demo2.html (100%)
 rename demo3.html => examples/demo3.html (100%)

diff --git a/build.xml b/build.xml
deleted file mode 100644
index 984d861..0000000
--- a/build.xml
+++ /dev/null
@@ -1,167 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project name="html2canvas" basedir="." default="build">
-    <property name="src.dir" location="src"/>
-    <property name="lib.dir" location="../lib"/>
-    <property name="build.dir" location="build"/>
-    <property name="dist"  location="dist"/>
-    <property name="jquery-externs" value="jquery-1.4.4.externs.js"/>
-
-    <property name="JS_NAME" value="html2canvas.js"/>
-    <property name="JS_NAME_MIN" value="html2canvas.min.js"/>
-    <property name="JQUERY_PLUGIN_NAME" value="jquery.plugin.html2canvas.js"/>
-    <loadfile property="version" srcfile="version.txt" />
-
-    <path id="sourcefiles">
-        <filelist dir="${src.dir}">
-            <file name="LICENSE"/>
-            <file name="html2canvas-pre.txt"/>
-            <file name="Core.js"/>
-            <file name="Generate.js"/>
-            <file name="Parse.js"/>
-            <file name="Preload.js"/>
-            <file name="Queue.js"/>
-            <file name="Renderer.js"/>
-            <file name="Util.js"/>
-			<file name="renderers/Canvas.js"/>
-            <file name="html2canvas-post.txt"/>
-		</filelist>
-	</path>
-
-    <path id="sourcefiles-allrends">
-        <filelist dir="${src.dir}">
-            <file name="LICENSE"/>
-            <file name="html2canvas-pre.txt"/>
-            <file name="Core.js"/>
-            <file name="Generate.js"/>
-            <file name="Parse.js"/>
-            <file name="Preload.js"/>
-            <file name="Queue.js"/>
-            <file name="Renderer.js"/>
-            <file name="Util.js"/>
-			<file name="renderers/Canvas.js"/>
-			<file name="renderers/SVG.js"/>
-            <file name="html2canvas-post.txt"/>
-		</filelist>
-	</path>
-
-    <path id="jquery-plugin">
-        <fileset dir="${src.dir}" includes="LICENSE"/>
-        <fileset dir="${src.dir}/plugins" includes="${JQUERY_PLUGIN_NAME}"/>
-    </path>
-
-    <target name="build-dir">
-        <echo>Creating directory ${build.dir}...</echo>
-        <mkdir dir="${build.dir}"/>
-    </target>
-
-    <target name="plugins" depends="build-dir">
-        <echo>Creating ${JQUERY_PLUGIN_NAME}...</echo>
-        <concat fixlastline="yes" destfile="${build.dir}/${JQUERY_PLUGIN_NAME}">
-            <path refid="jquery-plugin"/>
-        </concat>
-        <replaceregexp match="@VERSION@" replace="${version}" flags="g" byline="true" file="${build.dir}/${JQUERY_PLUGIN_NAME}" />
-    </target>
-
-    <pathconvert property="prettty-sourcefiles" pathsep="${line.separator}" refid="sourcefiles"></pathconvert>
-	
-	<pathconvert property="prettty-sourcefiles-allrends" pathsep="${line.separator}" refid="sourcefiles-allrends"></pathconvert>
-
-    <target name="build" depends="build-dir,plugins">
-        <echo>Concatenating files:${line.separator}${prettty-sourcefiles}${line.separator}into ${build.dir}/${JS_NAME}...</echo>
-		<concat fixlastline="yes" destfile="${build.dir}/${JS_NAME}">
-			<path refid="sourcefiles"/>
-        </concat>
-        <replaceregexp match="@VERSION@" replace="${version}" flags="g" byline="true" file="${build.dir}/${JS_NAME}" />
-	</target>
-
-    <target name="build-allrends" depends="build-dir,plugins">
-        <echo>Concatenating files:${line.separator}${prettty-sourcefiles-allrends}${line.separator}into ${build.dir}/${JS_NAME}...</echo>
-		<concat fixlastline="yes" destfile="${build.dir}/${JS_NAME}">
-			<path refid="sourcefiles-allrends"/>
-        </concat>
-        <replaceregexp match="@VERSION@" replace="${version}" flags="g" byline="true" file="${build.dir}/${JS_NAME}" />
-    </target>
-
-    <taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask"
-           classpath="${lib.dir}/compiler.jar" onerror="report"/>
-
-    <target name="syntaxcheck" depends="build-dir,build">
-        <jscomp compilationLevel="simple" warning="verbose"
-            debug="false"
-            output="${build.dir}/${JS_NAME_MIN}.tmp">
-            <externs dir="${lib.dir}">
-                 <file name="${jquery-externs}"/>
-            </externs>
-            <sources dir="${src.dir}">
-                <!-- need to write them again here since the closure compiler doesn't understand filesets,... -->
-                <file name="LICENSE"/>
-                <file name="Core.js"/>
-                <file name="Generate.js"/>
-                <file name="Parse.js"/>
-                <file name="Preload.js"/>
-                <file name="Queue.js"/>
-                <file name="Renderer.js"/>
-                <file name="Util.js"/>
-				<file name="renderers/Canvas.js"/>
-            </sources>
-        </jscomp>
-        <delete file="${build.dir}/${JS_NAME_MIN}.tmp"></delete>
-	</target>
-
-    <target name="syntaxcheck-allrends" depends="build-dir,build-allrends">
-        <jscomp compilationLevel="simple" warning="verbose"
-            debug="false"
-            output="${build.dir}/${JS_NAME_MIN}.tmp">
-            <externs dir="${lib.dir}">
-                 <file name="${jquery-externs}"/>
-            </externs>
-            <sources dir="${src.dir}">
-                <!-- need to write them again here since the closure compiler doesn't understand filesets,... -->
-                <file name="LICENSE"/>
-                <file name="Core.js"/>
-                <file name="Generate.js"/>
-                <file name="Parse.js"/>
-                <file name="Preload.js"/>
-                <file name="Queue.js"/>
-                <file name="Renderer.js"/>
-                <file name="Util.js"/>
-				<file name="renderers/Canvas.js"/>
-				<file name="renderers/SVG.js"/>
-            </sources>
-        </jscomp>
-        <delete file="${build.dir}/${JS_NAME_MIN}.tmp"></delete>
-    </target>
-
-    <target name="release" depends="build-dir,build,syntaxcheck">
-        <jscomp compilationLevel="simple" warning="verbose"
-            debug="false"
-            output="${build.dir}/${JS_NAME_MIN}">
-            <externs dir="${lib.dir}">
-                 <file name="${jquery-externs}"/>
-            </externs>
-            <sources dir="${build.dir}">
-                <file name="${JS_NAME}"/>
-            </sources>
-        </jscomp>
-        <replaceregexp match="@VERSION@" replace="${version}" flags="g" byline="true" file="${build.dir}/${JS_NAME_MIN}" />
-    </target>
-
-    <target name="release-allrends" depends="build-dir,build-allrends,syntaxcheck-allrends">
-        <jscomp compilationLevel="simple" warning="verbose"
-            debug="false"
-            output="${build.dir}/${JS_NAME_MIN}">
-            <externs dir="${lib.dir}">
-                 <file name="${jquery-externs}"/>
-            </externs>
-            <sources dir="${build.dir}">
-                <file name="${JS_NAME}"/>
-            </sources>
-        </jscomp>
-        <replaceregexp match="@VERSION@" replace="${version}" flags="g" byline="true" file="${build.dir}/${JS_NAME_MIN}" />
-    </target>
-
-    <target name="clean">
-        <delete dir="${build.dir}"></delete>
-    </target>
-</project>
-
diff --git a/bookmarklet.html b/examples/bookmarklet.html
similarity index 100%
rename from bookmarklet.html
rename to examples/bookmarklet.html
diff --git a/demo.html b/examples/demo.html
similarity index 100%
rename from demo.html
rename to examples/demo.html
diff --git a/demo2.html b/examples/demo2.html
similarity index 100%
rename from demo2.html
rename to examples/demo2.html
diff --git a/demo3.html b/examples/demo3.html
similarity index 100%
rename from demo3.html
rename to examples/demo3.html
diff --git a/src/Parse.js b/src/Parse.js
index 5a3ba96..d82b5be 100644
--- a/src/Parse.js
+++ b/src/Parse.js
@@ -220,7 +220,7 @@ _html2canvas.Parse = function ( images, options ) {
     }
 
     ctx.setVariable("fillStyle", color);
-    ctx.setVariable("font", font_style+ " " + font_variant  + " " + bold + " " + size + " " + family);
+    ctx.setVariable("font", [font_style, font_variant, bold, size, family].join(" "));
     ctx.setVariable("textAlign", (align) ? "right" : "left");
     if (text_decoration !== "none"){
       return fontMetrics(family, size);