Пример #1
0
FontDescription::FontDescription(unsigned height,
                                 bool bold, bool italic,
                                 bool monospace)
{
    Init(monospace ? GetStandardMonospaceFontFace() : GetStandardFontFace(),
         -int(height), bold, italic, monospace);
}
Пример #2
0
static void
InitialiseLogFonts()
{
  if (IsAltair()) {
    LoadAltairLogFonts();
    return;
  }

#ifndef USE_GDI
  UPixelScalar font_height = Layout::SmallScale(IsAndroid() ? 30 : 24);
#else
  UPixelScalar font_height = Layout::SmallScale(35);
#endif

  // oversize first so can then scale down
  InitialiseLogfont(&log_infobox, GetStandardFontFace(),
                    (int)(font_height * 1.4), true, false, true);

#ifdef WIN32
  log_infobox.lfCharSet = ANSI_CHARSET;
#endif

  InitialiseLogfont(&log_title, GetStandardFontFace(), font_height / 3);

  // new font for CDI Scale
  InitialiseLogfont(&log_cdi, GetStandardFontFace(),
                    UPixelScalar(font_height * 0.6), false, false, false);

  // new font for map labels
  InitialiseLogfont(&log_map_label, GetStandardFontFace(),
                    UPixelScalar(font_height * 0.39), false, true);

  // new font for map labels big/medium cities
  InitialiseLogfont(&log_map_label_important, GetStandardFontFace(),
                    UPixelScalar(font_height * 0.39), false, true);

  // new font for map labels
  InitialiseLogfont(&log_map, GetStandardFontFace(),
                    UPixelScalar(font_height * 0.507));

  // Font for map bold text
  InitialiseLogfont(&log_map_bold, GetStandardFontFace(),
                    UPixelScalar(font_height * 0.507), true);

  InitialiseLogfont(&log_infobox_small, GetStandardFontFace(),
                    Layout::Scale(20));

#ifndef GNAV
  InitialiseLogfont(&log_infobox_units, GetStandardFontFace(),
                    (int)(font_height * 0.56));
#endif

  InitialiseLogfont(&log_monospace, GetStandardMonospaceFontFace(),
                    UPixelScalar(font_height * 0.39), false, false, false);
}
Пример #3
0
void
TerminalLook::Initialise()
{
#ifdef GNAV
  font.Load(FontDescription(GetStandardMonospaceFontFace(),
                            12, false, false, true));
#else
  font.Load(FontDescription(Layout::FontScale(11), false, false, true));
#endif

  background_color = COLOR_BLACK;
  text_color = COLOR_WHITE;
}
Пример #4
0
static void
LoadAltairLogFonts()
{
  InitialiseLogfont(&log_infobox, _T("RasterGothicTwentyFourCond"), 24, true);
  InitialiseLogfont(&log_title, _T("RasterGothicNineCond"), 10);
  InitialiseLogfont(&log_cdi, _T("RasterGothicEighteenCond"), 19, true);
  InitialiseLogfont(&log_map_label, _T("RasterGothicTwelveCond"), 13);
  InitialiseLogfont(&log_map_label_important,
                    _T("RasterGothicTwelveCond"), 13);
  InitialiseLogfont(&log_map, _T("RasterGothicFourteenCond"), 15);
  InitialiseLogfont(&log_map_bold, _T("RasterGothicFourteenCond"), 15, true);
  InitialiseLogfont(&log_infobox_small, _T("RasterGothicEighteenCond"), 19, true);
  InitialiseLogfont(&log_monospace, GetStandardMonospaceFontFace(),
                    10, false, false, false);
}
Пример #5
0
static void
LoadAltairLogFonts(FontSettings &settings)
{
  settings.dialog = FontDescription(_T("RasterGothicTwelveCond"), 13);
#ifdef GNAV
  settings.dialog_small = FontDescription(_T("RasterGothicNineCond"), 10);
#endif
  settings.infobox = FontDescription(_T("RasterGothicTwentyFourCond"),
                                     24, true);
  settings.title = FontDescription(_T("RasterGothicNineCond"), 10);
  settings.cdi = FontDescription(_T("RasterGothicEighteenCond"), 19, true);
  settings.map_label = FontDescription(_T("RasterGothicTwelveCond"), 13);
  settings.map_label_important = FontDescription(_T("RasterGothicTwelveCond"),
                                                 13);
  settings.map = FontDescription(_T("RasterGothicFourteenCond"), 15);
  settings.map_bold = FontDescription(_T("RasterGothicFourteenCond"),
                                      15, true);
  settings.infobox_small = FontDescription(_T("RasterGothicEighteenCond"),
                                           19, true);
  settings.monospace = FontDescription(GetStandardMonospaceFontFace(),
                                       12, false, false, true);
}