From 6645b41fac324c8318b93377db5d55faf2bc8a95 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Sun, 20 Sep 2009 23:34:53 -0500 Subject: [PATCH] use hott vista fonts on windows 6.x --- basis/windows/fonts/fonts.factor | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/basis/windows/fonts/fonts.factor b/basis/windows/fonts/fonts.factor index b8acf5d8d1..4e1310ff57 100755 --- a/basis/windows/fonts/fonts.factor +++ b/basis/windows/fonts/fonts.factor @@ -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 -- 2.34.1