diff --git a/src/map/imgmap.cpp b/src/map/imgmap.cpp index d32decf3..06e312c1 100644 --- a/src/map/imgmap.cpp +++ b/src/map/imgmap.cpp @@ -102,13 +102,19 @@ static int minPOIZoom(Style::POIClass cl) } } +static QFont font(int pixelSize) +{ + QFont f; + f.setPixelSize(pixelSize); + return f; +} + /* The fonts must be initialized on first usage (after the QGuiApplication instance is created) */ #define FONT(name, size) \ static const QFont *name() \ { \ - static QFont f; \ - f.setPixelSize(size); \ + static QFont f = font(size); \ return &f; \ }