viking icon indicating copy to clipboard operation
viking copied to clipboard

Wrong map resolution on 4k screen

Open roooots opened this issue 4 years ago • 3 comments

Hi all,

got myself a new monitor after almost 15 years - 4k resolution is really amazing for the eyes. I'm running Ubuntu 20.04 mate with DPI scaling set to 170%. Unfortunately, there are some issues with viking.

First, while fonts etc. in viking are rendered properly in native resolution, the map is not. I have no idea what resolution it actually is, but it is somewhat lower than native, which makes the map appear blurred. This happens with all types of maps I've tried so far (mapnik, hike bike, etc.).

Second, and a bit less of an issue, although toolbar icon size in settings is set to "system defaults", icons are considerably smaller than system default. Switching to "large", however, they're even smaller.

Any suggestions, pointers or fixes very much appreciated! r.

roooots avatar Jun 13 '20 17:06 roooots

Regarding the map, if you run Viking from the command line with '-d' option it should print out some 'Screen Resolution is...' and 'Scale set to ...' information. It should automatically set this scale value to something appropriate - typically 2 for a high resolution display - ATM this is simply a whole number.

IIRC maps are simply scaled up, so the resultant image will be blurry.

So one really needs a corresponding high resolution tile source, of which I only know of one, try adding this to your ~/.viking/maps.xml and then use it:

<objects>
  <!-- An example of High Res Tile source -->
  <object class="VikSlippyMapSource">
    <property name="id">193</property>
    <property name="name">OSMANDHD</property>
    <property name="label">OSMAND HD</property>
    <property name="url">https://tile.osmand.net/hd/%d/%d/%d.png</property>
    <property name="scale">2</property>
    <property name="copyright">© OpenStreetMap contributors</property>
    <property name="license">CC-BY-SA</property>
    <property name="license-url">http://www.openstreetmap.org/copyright</property>
  </object>
<objects>

Or alternatively you could try overriding Viking's drawing scale factor value in your ~/.viking.ini by forcing it back down to 1; but then line and point drawing will default to being rather small and thin.

viewport_scale=1

For the toolbar size, I take you have tried 'small' and 'medium' settings just to see what happens? I suspect there must be some discrepancy between the Gtk2 system and the theming used in your system. It still works for me on Ubuntu18.04, but its on a laptop so a standard 96DPI display.

The only other thing I can immediately think of is to try the Toolbar Preference --> Append to Menu as well, in order to find a combination that yeilds the largest icons.

HTH.

rnorris avatar Jun 14 '20 10:06 rnorris

Hi,

thanks for the quick reply and I'm honestly sorry for my late feedback.

Viewport scaling would be ok for me in general, however as the fonts for map element names are scaled as well, they become pretty much unreadable :-) So thanks for the HD map source, which is working quite well.

I tried the toolbar icon size again and interestingly, it is the same for "small" and "large" settings, that is, tiny, while it is a bit larger (but also the same size) if I select "medium" or "system default". I have checked "append to menu" by default. But then again as I already wrote, the icons are a minor issue

Thanks again!

roooots avatar Jun 26 '20 18:06 roooots

I think that there are no good solutions as the font size is provided by the map. So, here I only have the choice between a map displayed in HD with tiny fonts (due to the very high DPI of my screen) and a map that is scaled up, thus less detailed.

vinc17fr avatar Aug 11 '22 17:08 vinc17fr