Skip to content

Commit a2a8878

Browse files
authored
Merge pull request #46 from Luflosi/fix-fonts-option
Fix --fonts CLI option
2 parents 6e3605c + e721ec0 commit a2a8878

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

nik4.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,11 @@ def run(options):
286286
bbox = None
287287
rotate = not options.norotate
288288

289+
# register non-standard fonts
290+
if options.fonts:
291+
for f in options.fonts:
292+
add_fonts(f)
293+
289294
if (options.ozi and options.projection.lower() != 'epsg:3857'
290295
and options.projection != EPSG_3857):
291296
raise Exception('Ozi map file output is only supported for Web Mercator (EPSG:3857). ' +
@@ -421,11 +426,6 @@ def run(options):
421426
mapnik.load_map_from_string(m, style_xml.encode("utf-8"), False, style_path)
422427
m.srs = proj_target.params()
423428

424-
# register non-standard fonts
425-
if options.fonts:
426-
for f in options.fonts:
427-
add_fonts(f)
428-
429429
# get bbox from layer extents
430430
if options.fit:
431431
bbox = layer_bbox(m, options.fit.split(','), proj_target, bbox)

0 commit comments

Comments
 (0)