Skip to content

Commit

Permalink
Merge pull request #46 from Luflosi/fix-fonts-option
Browse files Browse the repository at this point in the history
Fix --fonts CLI option
  • Loading branch information
Zverik authored Dec 1, 2024
2 parents 6e3605c + e721ec0 commit a2a8878
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nik4.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,11 @@ def run(options):
bbox = None
rotate = not options.norotate

# register non-standard fonts
if options.fonts:
for f in options.fonts:
add_fonts(f)

if (options.ozi and options.projection.lower() != 'epsg:3857'
and options.projection != EPSG_3857):
raise Exception('Ozi map file output is only supported for Web Mercator (EPSG:3857). ' +
Expand Down Expand Up @@ -421,11 +426,6 @@ def run(options):
mapnik.load_map_from_string(m, style_xml.encode("utf-8"), False, style_path)
m.srs = proj_target.params()

# register non-standard fonts
if options.fonts:
for f in options.fonts:
add_fonts(f)

# get bbox from layer extents
if options.fit:
bbox = layer_bbox(m, options.fit.split(','), proj_target, bbox)
Expand Down

0 comments on commit a2a8878

Please sign in to comment.