You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
i am trying to get a small test program to work. but at run time i get this error: Fontconfig error: Cannot load default config file: No such file: (null)
i'm tried to put the "/installed\x64-windows\etc\fonts" in the path varable but doesn't work
Environment
OS: Windows 11
Compiler:Microsoft Visual Studio Community 2022 (64 bit) - Current Version 17.2.3
int
main(int argc, char** argv)
{
osgEarth::initialize();
osg::ArgumentParser arguments(&argc, argv);
if (arguments.read("--help"))
return usage(argv[0]);
osgViewer::Viewer viewer(arguments);
viewer.setThreadingModel(viewer.SingleThreaded);
viewer.setCameraManipulator(new EarthManipulator(arguments));
// Call this to enable ImGui rendering.
// If you use the MapNodeHelper, call this first.
//viewer.setRealizeOperation(new GUI::ApplicationGUI::RealizeOperation);
osg::ref_ptr<osg::Node> node = MapNodeHelper().loadWithoutControls(arguments, &viewer);
if (node.valid())
{
// Call this to add the GUI.
// Passing "true" tells it to install all the built-in osgEarth GUI tools.
// Put it on the front of the list so events don't filter
// through to other handlers.
// viewer.getEventHandlers().push_front(new GUI::ApplicationGUI(arguments, true));
viewer.setSceneData(node);
return Metrics::run(viewer);
}
else
{
return usage(argv[0]);
}
}`
The text was updated successfully, but these errors were encountered:
@coderc264 How to configure this file after porting the program, without using environment variables? I tried to put it in the program root directory, but it didn't work
@coderc264 How to configure this file after porting the program, without using environment variables? I tried to put it in the program root directory, but it didn't work
I put the fonts folder at exe's directory, it works. No need environment variables.
like this:
my app path: D:\project\build_osgearth_demo\Debug\myApp.exe
fonts path: D:\lib\vcpkg\installed\x64-windows\etc\fonts -> D:\project\build_osgearth_demo\Debug\fonts
Describe the bug
i am trying to get a small test program to work. but at run time i get this error:
Fontconfig error: Cannot load default config file: No such file: (null)
i'm tried to put the "/installed\x64-windows\etc\fonts" in the path varable but doesn't work
Environment
To Reproduce
Steps to reproduce the behavior:
Repro code when
Expected behavior
Fontconfig error: Cannot load default config file: No such file: (null)
Error reading file C:/WINDOWS/fonts\CascadiaCode.ttf: file not handled
Error reading file ..\tests\openstreetmap_flat.earth: file not handled
[osgEarth]* [MapNodeHelper] No valid earth file loaded - aborting
[osgEarth]
Code
`//#include <osgEarth/ImGui/ImGui>
#include <osgEarth/EarthManipulator>
#include <osgEarth/ExampleResources>
#include <osgEarth/Metrics>
#include <osgViewer/Viewer>
#define LC "[imgui] "
using namespace osgEarth;
using namespace osgEarth::Util;
int
usage(const char* name)
{
OE_NOTICE
<< "\nUsage: " << name << " file.earth" << std::endl
<< MapNodeHelper().usage() << std::endl;
return 0;
}
int
main(int argc, char** argv)
{
osgEarth::initialize();
}`
The text was updated successfully, but these errors were encountered: