immersive-web / webxr-gamepads-module

Repository for the WebXR Gamepads Module
https://immersive-web.github.io/webxr-gamepads-module
Other
30 stars 11 forks source link

[editorial] Size (font, plate) in xr-standard-mapping.svg #7

Closed himorin closed 5 years ago

himorin commented 5 years ago

(Not sure it's correct understanding of behavior,, sorry.) In Firefox (only; not for Chrome, Edge, IE), minimum font size setting seems to be applied to SVG image also, and characters are shown in overlap to upper/lower as attached since each text (tspan) has style of "font-size:4.23333311px". It seems just configure inkspace parameter to have x2 (or x3) mapping between physical to pixel, but not yet tried.

toji commented 5 years ago

Was able to repro this in Firefox after some initial confusion finding the setting in question. For anyone else looking for it you get the above effect by navigating to: Main Menu (☰) > "Options" > "General" tab > "Language and Appearance" section > "Advanced" > "Minimum Font Size". It defaults to "None", but setting it to a value like 14 or so will give you larger text in the SVG.

I'm not entirely sure what to do here. Obviously the above image doesn't look great, but it also seems to be correctly adhering to this accessibility setting. We can't, to my knowledge, dynamically adjust the SVG placement depending on font size, so we'd have to do something more drastic to fix this. The solutions I see are as follows:

  1. We "bake" the text into the SVG as curves. This will prevent it from scaling but also increases image size and makes editing/translating significantly harder.
  2. We restructure the image to either allow for more space for text or move all text to the spec markup with some way to cross reference between the spec text and the image.
  3. We ignore this issue, recognizing that it will only occur to a small percentage of Firefox users who have explicitly enabled this feature.

If anyone has a better suggestion I'd be happy to hear it!

It seems just configure inkspace parameter to have x2 (or x3) mapping between physical to pixel, but not yet tried.

I apologize, but I'm not entirely sure what this is referring to? I haven't been able to find any parameters like this in Inkscape.

himorin commented 5 years ago

I apologize, but I'm not entirely sure what this is referring to? I haven't been able to find any parameters like this in Inkscape.

how about to do like following?

toji commented 5 years ago

Fixed by #20. (Thanks!)