]> gitweb.factorcode.org Git - factor.git/commitdiff
use hott vista fonts on windows 6.x
authorJoe Groff <arcata@gmail.com>
Mon, 21 Sep 2009 04:34:53 +0000 (23:34 -0500)
committerJoe Groff <arcata@gmail.com>
Mon, 21 Sep 2009 04:34:53 +0000 (23:34 -0500)
basis/windows/fonts/fonts.factor

index b8acf5d8d1ab9f31d390b6b1de787e137c70f5b6..4e1310ff578aa1d34477ec592b5716b8b01f065d 100755 (executable)
@@ -1,13 +1,23 @@
 USING: assocs memoize locals kernel accessors init fonts math
-combinators windows.errors windows.types windows.gdi32 ;
+combinators system-info.windows windows.errors windows.types
+windows.gdi32 ;
 IN: windows.fonts
 
-: windows-font-name ( string -- string' )
+MEMO: windows-fonts ( -- fonts )
+    windows-major 6 >=
+    H{
+        { "sans-serif" "Calibri" }
+        { "serif" "Cambria" }
+        { "monospace" "Consolas" }
+    }
     H{
         { "sans-serif" "Tahoma" }
         { "serif" "Times New Roman" }
         { "monospace" "Courier New" }
-    } ?at drop ;
+    } ? ;
+
+: windows-font-name ( string -- string' )
+    windows-fonts ?at drop ;
 
 MEMO:: (cache-font) ( font -- HFONT )
     font size>> neg ! nHeight