Ticket #2185: src_servers_app_FontManager.cpp.diff

File src_servers_app_FontManager.cpp.diff, 1.2 KB (added by kaoutsis, 11 years ago)
  • src/servers/app/FontManager.cpp

     
    317317    // default known mappings
    318318    // TODO: load them for real, and use these as a fallback
    319319
    320     _AddDefaultMapping("Bitstream Vera Sans", "Roman",
    321         "/boot/beos/etc/fonts/ttfonts/Vera.ttf");
    322     _AddDefaultMapping("Bitstream Vera Sans", "Bold",
    323         "/boot/beos/etc/fonts/ttfonts/VeraBd.ttf");
    324     _AddDefaultMapping("Bitstream Vera Sans Mono", "Roman",
    325         "/boot/beos/etc/fonts/ttfonts/VeraMono.ttf");
     320    BPath ttfontsPath;
     321    if (find_directory(B_BEOS_FONTS_DIRECTORY, &ttfontsPath) == B_OK) {
     322        ttfontsPath.Append("ttfonts");
    326323
     324        BPath veraFontPath = ttfontsPath;
     325        veraFontPath.Append("Vera.ttf");
     326        _AddDefaultMapping("Bitstream Vera Sans", "Roman", veraFontPath.Path());
     327
     328        veraFontPath.SetTo(ttfontsPath.Path());
     329        veraFontPath.Append("VeraBd.ttf");
     330        _AddDefaultMapping("Bitstream Vera Sans", "Bold", veraFontPath.Path());
     331
     332        veraFontPath.SetTo(ttfontsPath.Path());
     333        veraFontPath.Append("VeraMono.ttf");
     334        _AddDefaultMapping("Bitstream Vera Sans Mono", "Roman", veraFontPath.Path());
     335    }
     336
    327337    return false;
    328338}
    329339