# HG changeset patch
# User John Tsiombikas <nuclear@member.fsf.org>
# Date 1402137474 -10800
# Node ID f067608d8a7cbcb27e6ead294dc4c0404b2c1847
# Parent  4ef47069633265cd863e119bc02d51620664e5d5
- fixed glyphmap loading on windows (open glyphmap as binary)
- added installation post-build rules in visual studio project

diff -r 4ef470696332 -r f067608d8a7c install.bat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/install.bat	Sat Jun 07 13:37:54 2014 +0300
@@ -0,0 +1,5 @@
+mkdir c:\usr\include\
+copy /Y usr\include\* c:\usr\include\
+mkdir c:\usr\lib
+copy /Y usr\lib\* c:\usr\lib\
+pause
diff -r 4ef470696332 -r f067608d8a7c libdrawtext.vcproj
--- a/libdrawtext.vcproj	Thu Apr 17 11:21:39 2014 +0300
+++ b/libdrawtext.vcproj	Sat Jun 07 13:37:54 2014 +0300
@@ -21,7 +21,7 @@
 			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="4"
-			CharacterSet="1"
+			CharacterSet="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
@@ -77,6 +77,7 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
+				CommandLine="mkdir usr\include&#x0D;&#x0A;mkdir usr\lib&#x0D;&#x0A;copy /Y src\drawtext.h usr\include\drawtext.h&#x0D;&#x0A;copy /Y $(TargetPath) usr\lib\$(TargetName)-dbg.lib&#x0D;&#x0A;"
 			/>
 		</Configuration>
 		<Configuration
@@ -84,8 +85,8 @@
 			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="4"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
+			CharacterSet="2"
+			WholeProgramOptimization="0"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
@@ -141,6 +142,7 @@
 			/>
 			<Tool
 				Name="VCPostBuildEventTool"
+				CommandLine="mkdir usr\include&#x0D;&#x0A;mkdir usr\lib&#x0D;&#x0A;copy /Y src\drawtext.h usr\include\drawtext.h&#x0D;&#x0A;copy /Y $(TargetPath) usr\lib&#x0D;&#x0A;"
 			/>
 		</Configuration>
 	</Configurations>
diff -r 4ef470696332 -r f067608d8a7c src/font.c
--- a/src/font.c	Thu Apr 17 11:21:39 2014 +0300
+++ b/src/font.c	Sat Jun 07 13:37:54 2014 +0300
@@ -332,7 +332,7 @@
 	FILE *fp;
 	struct dtx_glyphmap *gmap;
 
-	if(!(fp = fopen(fname, "r"))) {
+	if(!(fp = fopen(fname, "rb"))) {
 		return 0;
 	}
 	gmap = dtx_load_glyphmap_stream(fp);