use hott vista fonts on windows 6.x
							parent
							
								
									3eeaca8631
								
							
						
					
					
						commit
						6645b41fac
					
				| 
						 | 
					@ -1,13 +1,23 @@
 | 
				
			||||||
USING: assocs memoize locals kernel accessors init fonts math
 | 
					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
 | 
					IN: windows.fonts
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: windows-font-name ( string -- string' )
 | 
					MEMO: windows-fonts ( -- fonts )
 | 
				
			||||||
 | 
					    windows-major 6 >=
 | 
				
			||||||
 | 
					    H{
 | 
				
			||||||
 | 
					        { "sans-serif" "Calibri" }
 | 
				
			||||||
 | 
					        { "serif" "Cambria" }
 | 
				
			||||||
 | 
					        { "monospace" "Consolas" }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    H{
 | 
					    H{
 | 
				
			||||||
        { "sans-serif" "Tahoma" }
 | 
					        { "sans-serif" "Tahoma" }
 | 
				
			||||||
        { "serif" "Times New Roman" }
 | 
					        { "serif" "Times New Roman" }
 | 
				
			||||||
        { "monospace" "Courier New" }
 | 
					        { "monospace" "Courier New" }
 | 
				
			||||||
    } ?at drop ;
 | 
					    } ? ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					: windows-font-name ( string -- string' )
 | 
				
			||||||
 | 
					    windows-fonts ?at drop ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MEMO:: (cache-font) ( font -- HFONT )
 | 
					MEMO:: (cache-font) ( font -- HFONT )
 | 
				
			||||||
    font size>> neg ! nHeight
 | 
					    font size>> neg ! nHeight
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue