#94 Android 2.2 very slow

closed-fixed
nobody
5
2014-08-31
2010-08-31
Nick
No

It takes around 1 minute before math starts to render on the Android 2.2 device. I've narrowed it down to "jax/output/HTML-CSS/jax.js" and the fact that the "Chrome" settings doesn't check if the device is a mobile device. You can do the same check here as you do with Safari.

If you feel like duplicating this, you can obtain the android sdk (to run different versions of Android) at http://developer.android.com/sdk/index.html
That is not a plug, but it is how I duplicated this and tracked down the error.

I tried Android 2.1 and instead got this error (using the uncompressed version 1.0.1): Console: TypeError: Result of expression 'HTMLCSS.FONTDATA.FONTS["MathJax_Main"][0x2014][5]' [undefined] is not an object. .../mathjax-23830349aac8c1b7568edaa972a065a4/jax/output/HTML-CSS/imageFonts.js:175

Discussion

  • Nick

    Nick - 2010-08-31

    I think the mobile version supports otf.

     
  • Nick

    Nick - 2010-08-31

    That error in Android 2.1 I couldn't reproduce. Maybe just a one time thing - with caching or something. Although, I try to block caching problems with that hash you see in the directory tree.

     
  • Davide P. Cervone

    Thanks for the additional information about the problem. I understand that Android 2.2 is trying to load the web fonts and is timing out (and usually needs 4 fonts or so, with 15 second timeouts for each, that would be a full minute of delay). My Droid Incredible still says it is up to date with version 2.1, so I haven't been able to test this, but I'll try the SDK you link to -- thanks for that.

    I'm confused about the droid thinking it is Chrome, though; it should think it is Safari. Can you verify that it is Chrome by entering "javascript:alert(MathJax.Hub.Browser)" into the URL location and see if it really says Chrome? Thanks.

    I don't know why you had the version 2.1 problem, as that works reliably for me.

    I have read that 2.2 handles @font-face, but can't confirm it. If it does, MathJax is having trouble detecting the fonts once they arrive (that is very delicate). I will probably have to work on that.

    I'll get back to you when I know more.

    Davide

     
  • Davide P. Cervone

    • labels: --> Browser compatibility
    • status: open --> closed-fixed
     
  • Davide P. Cervone

    SVN 598 should take care of the problem for now. MathJax should be able to use thr web-based fonts on the Android 2.2, but they don't seem to be loading properly, so I'll have to look into it more. But for now, it uses the image fonts, which is how it was in 2.1.

    Davide

     
  • Nick

    Nick - 2010-09-01

    I can make Android 2.2 use the fonts by doing:

    Chrome: function (browser) {
    browser.isMobile = (navigator.appVersion.match(/Mobile/i) != null);
    HTMLCSS.Augment({
    rfuzz: .05,
    AccentBug: true,
    AdjustSurd: true,
    allowWebFonts: (!browser.isMobile ? "svg" : "otf"),
    safariNegativeSpaceBug: true,
    safariWebFontSerif: [""]
    });

     
  • Davide P. Cervone

    Try SVN 599. This should allow web fonts in Android 2.2 browsers.

    (Apparently I was having a caching problem earlier, though I thought that I had been clearing that. Anyway, it seems to be working now.)

    Davide

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks