File mapnik_fonts.cpp of Package mapnik

#include <iostream>
#include <mapnik/font_engine_freetype.hpp>

#ifndef MAPNIK_FONTS
#define MAPNIK_FONTS "/usr/lib64/mapnik/fonts/"
#endif

int main(int aregc, char **argv)
{
  mapnik::freetype_engine::register_fonts("/usr/share/fonts/", true);
  mapnik::freetype_engine::register_fonts(MAPNIK_FONTS, true);
  std::vector<std::string> v = mapnik::freetype_engine::face_names();
  for(std::vector<std::string>::iterator it = v.begin(); it != v.end(); ++it) {
    std::cout << *it << "\n";
  }
  return 0;
}
openSUSE Build Service is sponsored by