Closed volter closed 12 years ago
Can you suggest a default font to use on non-Windows systems?
I'm afraid, I can't suggest a font that is available on any system.
I'm not much of a programmer, but I can think of two approaches to this:
I didn't mean to close that.
Right; if you don't set a font (on Windows) you end up with a non-proportional, very ugly font. So we do need some sort of reasonable default. What is the result on your platform? Does it just fall back on a system font?
Believe this is addressed; there's a default font setting in osgEarth::Registry now
Various files use arial and arialbd fonts.
src/osgEarthFeatures/BuildTextOperator.cpp: std::string font = "fonts/arial.ttf"; src/applications/osgearth_measure/osgearth_measure.cpp: label->setFont( osgText::readFontFile( "arialbd.ttf" ) ); src/applications/osgearth_controls/osgearth_controls.cpp: label->setFont( osgText::readFontFile( "arialbd.ttf" ) ); src/applications/osgearth_elevation/osgearth_elevation.cpp: text->setFont( osgText::readFontFile("arial.ttf") ); src/applications/osgearth_symbology/osgearth_symbology.cpp: symbol->font() = "arial.ttf"; src/osgEarthUtil/Graticule.cpp: t->setFont( "fonts/arial.ttf" ); src/osgEarthUtil/Controls.cpp: setFont( osgText::readFontFile( "arial.ttf" ) ); // TODO: cache this? src/osgEarthUtil/Controls.cpp: setFont( osgText::readFontFile( "arial.ttf" ) ); // TODO: cache this? src/osgEarthUtil/SpatialData.cpp: s_font = osgText::readFontFile( "arialbd.ttf" ); src/osgEarthDrivers/worldwind/ReaderWriterWorldWind.cpp:* Contact: MattFranklin1 at gmail.com src/osgEarthDrivers/debug/DebugTileSource.cpp: _font = osgText::readFontFile( "arial.ttf" ); tests/feature_labels.earth: text-font: arial.ttf;
It'd probably be best not to hardcode at all, and if necessary, don't use proprietary fonts.