Offset Lines to avoid clipping?


I’m generating a touristic map where a trail can have several touristic marking colors (red, green, blue).

If I use the same style for the trail marking line (with just a different color), the lines are covering each other on the map and only one is visible.

Here you can see an official Garmin map where the green, blue and red trails are “next” to the actual road (in black)

I inspected the Garmin style.typ and they use exactly the same definition for the markings (except the color) and yet they are all offset.

Garmin style for red and blue trails:

My current workaround is to use a 16px bitmap for the trails and offset the line in the bitmap itself.

My Red

My Blue

I was wondering of there is a better way of achieving an offset of lines that would otherwise be displayed on top of each other.