Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong map resolution on 4k screen #97

Open
roooots opened this issue Jun 13, 2020 · 3 comments
Open

Wrong map resolution on 4k screen #97

roooots opened this issue Jun 13, 2020 · 3 comments

Comments

@roooots
Copy link

roooots commented Jun 13, 2020

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.

@rnorris
Copy link
Collaborator

rnorris commented Jun 14, 2020

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.

@roooots
Copy link
Author

roooots commented Jun 26, 2020

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!

@vinc17fr
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants