diff --git a/pkgs/maps/main.fnl b/pkgs/maps/main.fnl index 156f60f..3dc0bd4 100644 --- a/pkgs/maps/main.fnl +++ b/pkgs/maps/main.fnl @@ -157,11 +157,23 @@ label.readout { (cairo-roads-path g lines bounds) (g:set_source_rgb 0.2 0.2 0.2) - (g:set_font_size (- road-width 3)) + (g:set_font_size (+ road-width 1)) (each [_ line (pairs lines)] (case line.name - n (let [(x y angle) (label-coords line bounds)] + n (let [(x y angle) (label-coords line bounds) + ext (g:text_extents n) + w ext.width + h ext.height] (when (and x y) + (g:save) + (g:set_line_width h) + (g:set_source_rgb 1 1 1) + (g:move_to (- x 1) (- y 1)) + (g:rotate angle) + (g:rel_line_to (+ w 1) 0) + (g:stroke) + (g:restore) + (g:save) (g:move_to x y) (g:rotate angle)