EnglishРусский  

   ..

   addustr.g

   app.g

   btn.g

   btnpic.g

   comp.g

   ctrl.g

   ctrlci.g

   dialogs.g

   dlgbtns.g

   edit.g

   events.g

   fonts.g

   form.g

   gray.g

   grey.g

   header.g

   images.g

   label.g

   labeled.g

   locustr.g

   menu.g

   panel.g

   picture.g

   styles.g

   tab.g

   tabitem.g

   tabpage.g

   timer.g

   toolbar.g

   tray.g

   url.g

   vis.g

   viswin.g

The project is closed! You can look at a new scripting language. It is available on GitHub.
Also, try our open source cross-platform automation software.

Ads

Installer and installation software
Commercial and Freeware installers.

source\lib\vis\fonts.g
 1 type Font
 2 {
 3    uint hFont
 4 }
 5 
 6 type FontManager <inherit=hash>
 7 {
 8 }
 9 
10 method Font FontManager.GetFont( str name )
11 {
12    return this[name]->Font   
13 }
14 
15 method FontManager.AddFont( str name, uint hFont )
16 {
17    uint f as .GetFont( name )   
18    if &f
19    {
20       DeleteObject( f.hFont )
21    }
22    else
23    {
24       f as new( Font )->Font
25       this[name] = &f      
26    }   
27    //print( " \(&f) \(name) \(hFont )\n" )
28    f.hFont = hFont   
29 }
30 
31 method FontManager FontManager.Default()
32 {
33    uint hfont
34    int cur   
35    LOGFONT lf      
36    GetObject( GetStockObject( $DEFAULT_GUI_FONT ), sizeof( LOGFONT ), &lf )   
37    .AddFont( "default", CreateFontIndirect( lf ) )  
38    
39    cur = lf.lfUnderline   
40    lf.lfUnderline = 1      
41    .AddFont( "default_underline", CreateFontIndirect( lf ) )
42    lf.lfUnderline = cur
43       
44    cur = lf.lfWeight
45    lf.lfWeight = 800
46    .AddFont( "default_bold", CreateFontIndirect( lf ) )
47    lf.lfWeight = cur
48       
49    cur = lf.lfHeight   
50    lf.lfHeight = int( double(cur) * 1.5 )
51    .AddFont( "default_big", CreateFontIndirect( lf ) )
52    lf.lfHeight = cur
53          
54    return this
55 }