-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to register fonts within XML #168
Comments
[springmeyer] Given this patch usage would be something like: {{{ <Style name="states_shp_labels"> </Style> }}} |
[springmeyer] I took a crack at writing up some functions to try to load all fonts within a given directory. It seems to work somewhat, but I've managed to get both bus errors and segmentation faults :) Perhaps its generally a bad idea to allow wholesale registration of multiple fonts within a directory in c++, but it seems to work fine via glob in python, so hopefully someone can improve and fix my faulty code. Attached patch add methods to register all .ttf and .otf fonts in a given directory and includes testing print statements. |
[springmeyer] this not critical, pushing off till next release... |
[springmeyer] r1195 uses similar approach to above patches |
[springmeyer] I plan to take a look at this after we can get the 0.7.1 release tested and out in the wild. |
[springmeyer] font directory registration functions added in r2025. |
[springmeyer] r2273 finishes this up by storing the 'font_directory' in a mapnik::parameter on the map object so that this can be properly serialized with save_map and not lost in translation. |
Registering fonts, or whole directories of fonts, should be possible via the xml mapfile.
The attached patch enables registration of a specific font file within load_map(), but perhaps there are better ways of doing this.
Also, any thoughts on a better attribute name, whether registration should happen in another element (maybe ), and how to get a list of registered fonts to serialize in save_map() ?
The text was updated successfully, but these errors were encountered: