font errors running osgearth_viewer

classic Classic list List threaded Threaded
5 messages Options
2LR 2LR
Reply | Threaded
Open this post in threaded view
|

font errors running osgearth_viewer

I just built osgEarth 2.10.1 using the "building osgearth for Windows using vcpkg " instructions. I was able to build successfully but I'm getting the following errors when I run the osgearth_viewer…

osgearth_viewer simple.earth
Fontconfig error: Cannot load default config file
Error reading file C:\Windows\Fonts\arial.ttf: file not handled

Can anyone help me or suggest to me why this is happening? I have not seen this with my previous version of osgEarth.

Thanks in advance...

Shayne
2LR 2LR
Reply | Threaded
Open this post in threaded view
|

Re: font errors running osgearth_viewer

As a follow-up question, I noticed that vcpkg installs the "fontconfig" package. Is this needed to build osgEarth from source? I'm wondering if this is what is causing the font errors I'm seeing...
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: font errors running osgearth_viewer

In reply to this post by 2LR
Seems like it cannot find the plugin to read TTF. Did you build OSG with the Freetype library?
Glenn Waldron / Pelican Mapping
2LR 2LR
Reply | Threaded
Open this post in threaded view
|

Re: font errors running osgearth_viewer

Glenn,

I built osgEarth 2.10.1 using the vcpkg utility on Windows. This included the OSG package. Unless they're omitting the freetype package as a dependency for the OSG, I'm just assuming that it got put in there when OSG got built? Not sure how I can check the dependencies for each package with this utility.

Here is the output from vcpkg…per the instructions from the osgEarth documentation...

C:\vcpkg>vcpkg install osg:x64-windows sqlite3:x64-windows protobuf:x64-windows poco:x64-windows geos:x64-windows
Computing installation plan...

The following packages will be built and installed:
  * bzip2[core]:x64-windows
  * dirent[core]:x64-windows
  * expat[core]:x64-windows
  * fontconfig[core]:x64-windows
  * freeglut[core]:x64-windows
  * freetype[bzip2,core,png]:x64-windows
    geos[core]:x64-windows
  * libiconv[core]:x64-windows
  * libpng[core]:x64-windows
  * libpq[core,openssl,zlib]:x64-windows
  * openssl[core]:x64-windows
  * openssl-windows[core]:x64-windows
    osg[core]:x64-windows
  * pcre[core]:x64-windows
    poco[core]:x64-windows
    protobuf[core]:x64-windows
    sqlite3[core]:x64-windows
  * zlib[core]:x64-windows
Additional packages (*) will be modified to complete this operation.
2LR 2LR
Reply | Threaded
Open this post in threaded view
|

Re: font errors running osgearth_viewer

In reply to this post by 2LR
So...with a little digging, I was able to resolve the "Fontconfig error" above.

Apparently OSG 3.6.4 has made the osgText library dependent on the fontconfig library along with the freetype library. Not sure on the reason for this change since the freetype library doesn't need the fontconfig library.

Anyway, to fix the error, I did the following:

set FONTCONFIG_FILE=%FONTCONFIGDIR%\fonts.conf

where FONTCONFIGDIR is the directory where the fonts.conf file resides.

That fixes the first error. I have yet to figure out why I'm getting the second error as described in my original post...

Shayne