Changes between Version 1 and Version 2 of documentation/C++Manual/Fonts

Show
Ignore:
Author:
peterc (IP: 203.96.63.172)
Timestamp:
02/07/08 13:00:06 (10 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • documentation/C++Manual/Fonts

    v1 v2  
    3232 
    3333The italic and bold versions of a font are selected with the 'font-weight' and 'font-style' RCSS properties. 
     34 
     35In the following example, the font file at 'data/trilobyte.ttf' is loaded and registered with Rocket with the family name, style and weight settings specified in the file itself. 
     36 
     37{{{ 
     38Rocket::Core::FontDatabase::LoadFontFace("data/trilobyte.ttf"); 
     39}}} 
     40 
     41In this example, the font file is loaded with overrides for the name, style and weight. 
     42 
     43{{{ 
     44Rocket::Core::FontDatabase::LoadFontFace("data/trilobyte_b.ttf", 
     45                                         "Trilobyte", 
     46                                         Rocket::Core::Font::STYLE_NORMAL, 
     47                                         Rocket::Core::Font::WEIGHT_BOLD); 
     48}}} 
     49 
     50These fonts would be specified in RCSS with the following rules: 
     51{{{ 
     52body 
     53{ 
     54    font-family: Trilobyte; 
     55} 
     56 
     57strong 
     58{ 
     59    font-weight: bold; 
     60} 
     61}}}