iitc-project / ingress-intel-total-conversion

ingress.com/intel total conversion user script with some new features. Should allow easier extension of the intel map.
http://iitc.jonatkins.com/
ISC License
991 stars 552 forks source link

Bug: non-english characters not displayed #541

Closed SergeySnegirev closed 11 years ago

SergeySnegirev commented 11 years ago

Certain non-English characters are not displayed in IITC Mobile, although they are displayed in web Ingress map with IITC. Examples attached: you'll notice that instead of Lāčplēsis it says Lā plēsis in the bottom left corner of Android screen, "č" is missing.

Since ā and ē are displayed ok, my money is on font missing characters, not encoding issues.

android screenshot windows screenshot

jonatkins commented 11 years ago

Can you include a link to the portal please?

SergeySnegirev commented 11 years ago

http://www.ingress.com/intel?ll=56.972032,23.795938&z=18&pll=56.972032,23.795938 On Sep 8, 2013 5:14 PM, "Jon Atkins" notifications@github.com wrote:

Can you include a link to the portal please?

— Reply to this email directly or view it on GitHubhttps://github.com/jonatkins/ingress-intel-total-conversion/issues/541#issuecomment-24021504 .

leCradle commented 11 years ago

@SergeySnegirev Yes it seems to be a font-problem. Thx for the hint!

The default android-font is not able to display these characters. Sans-serif, serif and monospace seems to work, so this can be fixed via css. I'll commit a patch tomorrow.

screenshot_2013-09-08-23-51-32

jonatkins commented 11 years ago

IITC should be pulling in an external font, not using the system default. See main.js

  + '<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Coda"/>'
  + '<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Roboto"/>';
jonatkins commented 11 years ago

Update: I had a closer look at this. The "Coda" font doesn't support these characters, but the "Roboto" one does.

Also, by default, Google sends the full font to desktop browsers, bot only the latin character subset to mobile browsers. This can be controlled with additional URL parameters.

leCradle commented 11 years ago

@jonatkins good to know. Is there a reason why they are doing it this way? To safe traffic? Did you find out what URL parameters we need?

jonatkins commented 11 years ago

I committed a change with the required parameters and switched the default font. As Ingress is global I included all font subsets available.

Not sure if it'll be an excessive filesize on mobile or not - we can always tweak it if needed. It should be cached after the first load anyway.

leCradle commented 11 years ago

Looks good to me. The portal info maybe needs some tweaking for smartphone because of the "bigger" font size ("links" and "reso dist" look a bit ugly)... After this, I think we can close this issue .... screenshot_2013-09-09-19-27-27

vita10gy commented 11 years ago

Just change it to "Res Dist"? most people abbreviate them res/reses anyway.