-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Some MathJax character-related problems in Android webview #403
Comments
In the |
Oh, that would be worse. Maybe Davide can clarify. I guess this brings up the problem of better testing on mobile devices. We need to improve situation. I think Selenium has an Android solution which looks like just installing an APK (we could use an Android VM like androvm?) |
Installing the Selenium APK is the trivial part, I already did some experiments. But I only tried the Android emulator on a Linux virtual machine and that was very very slow... It's probably worth trying a more efficient set up. |
The example page loads fine for me in the Android Browser app, which (I assume) uses a webview, in Android 4.1.2. There should not be a font issue, as the same font is used for all the letters in the symbol, even though some are sized. Not sure what else to suggest. |
I think I'm able to reproduce this. I'll send you an APK to try. |
BTW: no webview is something different from the browser. But IIUC it's the only thing apps have access to. |
I didn't mean that webview was the browser, but I assumed the browser used a webview. I'll take a look at your code and see if I can get it to run to test with. |
Ah, not sure, cf. https://developers.google.com/chrome/mobile/docs/faq. Then again from http://www.zdnet.com/blog/burnette/google-io-2012-android-fireside-chat/2637:
Since I only experienced this on JellyBean, maybe the actual reason is that change to WebView... |
Hm. Who added the "cannot reproduce" label? I can reproduce this with the app I linked to. |
Even I suffer from the same problem for the letter 'A' and \right) in math mode in Nexus 7. Is there any solution to this? |
I have a nexus 4 with android 4.3. |
Thanks. Yes, Dolphin exhibits the same webview bug because it's using webview -- that should make it easier to track this issue down. Any Google chrome issue would be unrelated to this bug since Chrome does not use webview but we'll check it out. |
It appears that arrow marks (like, over vector names) are affected, as well. Has anyone found a full workaround or fix, yet? |
@dpvc I've added this to the milestone. Are you still unable to reproduce this? |
FYI, I recently updated to Android 4.4.2, and once I did so, the problem went away, as far as I can tell. |
@Erhannis that's expected. Android 4.4 (KitKat) finally updated webview from an ancient WebKit build to a relatively recent Blink/Chromium build (not that this didn't also break other things). So yes, this is only a problem for <4.4 (which is 90%+ of the Android market unfortunately). |
@pkra, I am not able to reproduce on a Droid Razr Maxx running 4.1.2. The site listed by bosbeles above loads fine for me in Dolphin. Pages on math.stackexchange.com that include A's in math mode load fine for me. I am not able to see any missing characters anywhere. Not sure what the conditions are that cause the problems for you all. |
@dpvc how strange. I see this reliably on a Galaxy Nexus (4.2.2) and saw this on my Nexus 7 before the KitKat update. But I just tried this on AndroVM -- and it doesn't show there anymore. Trying browserstack doesn't work either because all screenshots I tried timed out before the rendering is done. Pfft. I'm out of ideas. But I'll show it to you on our next video call... |
I believe you, I just don't know how to reproduce it so that I can debug it. |
What is the best way to check if any other glyphs are affected? Do you have some sort of test page containing every glyph so that I can try rendering it? Currently I know of these:
|
Well, I have font tables that show all the glyphs, but they may not be in the most convenient form for this task. I've attached an archive that includes the tables (and the fonts that it calls on). It is broken down by font and Unicode character block. At the bottom are pages that include all the glyphs in each font, and at the right, all the fonts for a particular block. The bottom right corner is all glyphs from all fonts, but it would be hard to tell if one was missing there. your best bet is probably the ones at the bottom of the table. Note that the light grey boxes should contain glyphs and the dark grey indicate that that glyph is in another font. I've attached the archive here, but it may not make it to GitHub. Not sure they will list it as an attachment somehow. [Edit: apparently they don't] Thanks for looking into this. I look forward to hearing your results. Davide |
I don't think the archive made it to GitHub. Would you please provide another way to download it or send it to my mail: |
Here it is https://redbooth.com/d/03957cf9f7acf775 |
Thank you for the neat font tables! We have just completed a thorough check of all the glyphs in every font using the Android built-in browser. We have found the following pattern
Do you have any idea of what is going on with WebKit and the otf-fonts and how it can be fixed? We provide our detailed results below: MathJax_Main (regular) Character Tables
Combining diacritical marks:
Other notes:
MathJax_Math-Italic Character Tables
MathJax_Size1 Character Tables
Combining diacritical marks:
Other notes:
MathJax_AMS Character Tables
Other notes:
MathJax_Caligraphic Character Tables
MathJax_Fraktur Character Tables
MathJax_SansSerif Character Tables
Other notes:
MathJax_Script Character Tables
MathJax_Typewriter Character Tables
Other notes:
MathJax_Greek Character Tables
MathJax_WinChrome Character Tables
MathJax_IE6 Character Tables
|
Thanks for the very thorough data collection and analysis. It is very helpful to have these tests performed. It certainly does seem that Android has a problem accessing the third glyph in the font. Very strange. That could account for the behavior you reported in issue 369 when you changed the A and the B disappeared. (The A may have been moved to the end of the list and the B became the third character, for example.) It looks like the only other problem is with the combining characters. These are notoriously troublesome, and give problems in several browsers. I'm not sure why the letters are showing up in sans serif for these, as they are definitely requesting the MathJax fonts for the letters and accents (and in exactly the same way they are requested for all the other characters). Note that the accents are in the wrong font, as well. I'm not sure what can be done about that. Fortunately, MathJax will substitute non-combining forms for most of these. The only one that doesn't have a non-combining version is the vector arrow. As for the Greek fonts, those are only used by IE, so you can ignore them. Same for the IE6 and WinChrome fonts. |
dpvc requested a similar test of the AsanaMathJax-fonts. Summary
We provide our detailed results below: Alphabets-Regular
Arrows-Regular
DoubleStruck-Regular
Fraktur-Regular
Latin-Regular
Main-Regular
Main-Regular
Marks-Regular
Misc-Regular
Monospace-Regular
NonUnicode-Regular
Normal-Regular
Operators-Regular
SansSerif-Regular
Script-Regular
Shapes-Regular
Size1-Regular
Size4-Regular
Size6-Regular
Symbols-Regular
Symbols-Regular
Variants-Regular
|
Thanks for going the extra mile to test these fonts out. It does look like the 3rd character issue is a general one with web fonts, as is the problem with the combining diacriticals. I suppose it would be possible to force the third character to be something not needed, but I hate to put out a whole new set of fonts just for this bug. Only two of the combining marks are critical: U+20D7 (used by I suppose an extra font (like MathJax_WinIE or MathJax_WinChrome) could be made that includes the missing 3rd characters and remap those to the new font. Kind of a pain, but at least it would not require everyone who has installed the MathJax fonts to get new copies. Perhaps that is the way to go, here. As for the characters U+EFFD through U+EFFF, these are special characters that MathJax uses to determine the font version and its style/weight. Because they are in all the fonts and only used internally, I didn't include them in the tables. You asked in the other thread about how the MathJax fonts where created: they come from mftrace, which is a program that turns the TeX bitmap fonts into outline fonts by tracing the outlines. The AsanaMathJax fonts were created by breaking up the actual Asana font, so the glyphs are directly from the original font. The tools used for the MathJaxTeX and AnasnaMathJax fonts were not the same, it seems to be more an Android problem than a MathJax one. |
Thanks for the details! An extra font for Android sounds like the best solution available. Would it be possible to add non-combining forms of U+20D7 (\vec) and U+0338 (\not) into this font as well so that MathJax can use these on Android? Wouldn't this give the most consistent look on all platforms? If you need any more assistance testing this issue we'll be happy to help. |
Yes, a non-combining form for U+20D7 could be provided. There is already a non-combing version of U+0338, but the way it is used can't really be replaced by that. Something special will have to be done for that. Thanks for your offer to help test. I will certain trace you up on that when there is something to test. |
Don't know if still relevant for your android testing trouble but this is easily reproduced on SauceLabs's free for open source service, e.g. |
Thanks for the pointer, @cben. That may be a way for me to work on it directly. |
@dpvc check the redbooth thread on saucelabs. |
This is mostly to investigate and to check if other people have experienced similar problems.
I often have small issues with some characters not showing in Android's webview (at least on 4.1, 4.2).
For example, viewing this post in a webview (via an RSS-reading app) the$\latex$ in the OP was missing only the
A
.This might be a webfont detection problem since I think (but have yet to confirm) that it's always some "special" characters (e.g., fraktur or small sizes).
The text was updated successfully, but these errors were encountered: