mapnik-ios-framework
mapnik-ios-framework copied to clipboard
Unable to load fonts
Hello, I have been testing/ playing around with the IOS framework for Mapnik. If you could kindly help me on the issue of loading the fonts. I always get the error:
Unable to find specified font face 'DejaVu Sans Book'
my style.xml is as follows:
Do I need to register fonts? how? Could you provide simple example to use a TextSymbolizer.
Thank you
I don't think I got fonts working either. It should be possible but it probably involves chasing the exact location mapnik tries to fopen() the font file and then manipulating that code to make sure there is no directory attached to the file location. Congratulations on making it this far though!
Hello, Thanks for the reply. I got it working by registering the font by:
mapnik::freetype_engine::register_font("path/to/font.ttf");
It needs the exact location of the ttf file. It does render the text but the placement is "point". By documentation of TextSymbolizer i use:
but generates an error:
Failed to parse attribute 'placement'. Expected one of [point, line, vertex, interior] but got 'line' in style 'MyStyle'
It was solved by building mapnik and all dependencies using libstdc++/clang++
according to https://github.com/mapnik/mapnik-support/issues/12
I am not sure how to do it. Any help?
Thanks