Azgaar / Fantasy-Map-Generator

Web application generating interactive and highly customizable maps

Home Page:https://azgaar.github.io/Fantasy-Map-Generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Marker icons have extra shift to the left if PNG and JPEG exports (SVG is unaffected)

AlexeyGorovoy opened this issue · comments

Description

Marker icons have a shift to the left when map is exported as PNG or JPEG, while SVG export does not have this problem.
I mostly do SVG exports for my purposes, but I'm sure PNG exports worked fine a few weeks back.

SVG:
Screenshot 2023-02-27 at 11 54 32

same map, PNG:
Screenshot 2023-02-27 at 11 54 46

Steps to reproduce

Create a new map, make sure it has markers with emojis inside a Bubble frame.
(the ones generated by default have this issue too)

Expected behaviour

PNG, JPEG and SVG exports have the same look as in the map editor.

Actual behaviour

In PNG and JPEG exports the emojis in markers are shifted to the left. SVG does not have this issue.

.map file

Sercy 2023-02-27-11-49.map.zip
This is just one of randomly generated maps, but the issue is present in all maps including the map I use since ~August 2022, that previously did not have this issue.

Generator version

v1.89.08

Browser version

Google Chrome, Version 109.0.5414.119 (Official Build) (x86_64)

commented

Hello. I see this problem, but for me it works fine for png/jpg, but a bit shifter in svg. The positioning on text icons is weird, frankly speaking I don't know what can be done here.

I found that maps exported using Firefox browser do not have this issue for me, so I'll stick to exporting them this way.

commented

I have no ideas on how to make it universal. Probably we will have to get rid of Unicode emojis

Well, on the one hand Unicode emojis are great cause you can basically treat images as text. But it comes with a cost that different OS and browsers have different implementations - exactly what's causing this issue.

Also, I find it not ideal that editor does not have a full control over how the map looks - if you open the same .map on macOS and on windows the markers may looks very different.

But what's the alternative here?
It has to be a predefined set of images, right?

Since nothing is stored on the server you probably can't easily allow custom pictures for markers, right?

I guess storing base64 version of a picture inside .map file is not that good alternative.

commented

I can add custom images, the problem here is the amount of work required to cover all needed images. Unicode provides lots of emojis and it makes adding new things much easier

For your information, i couldn't reproduce this in Chrome 115.0.5790.171