A couple of comments below:
> 1- Remove the PNG fonts... all of it. Delete.
Just to be clear, this is the MathJax/fonts/HTML-CSS/TeX/png directory
and its contents.
If you do this, you should be sure to set
imageFont: null
in your configuration, to let MathJax know it should not try to use
them. See the MathJax documentation at
http://www.mathjax.org/docs/1.1/configuration.html#configuring-mathjax
for details about how to specify the configuration.
> Bugs:
> - MathJax would try to load the image fonts in portrait mode but would
> not do so in landscape mode. I decided not to jump into MathJax code
> but to trick MathJax into thinking that it did not need to load the
> image fonts: in portrait mode the Web View is 480 pt wide for a short
> period of time (~0.5s) and then silently animate it to 320 pt. It
> worked.
Setting imageFont to null will prevent the attempt to use image fonts,
but probably wouldn't solve the problem, since then it would default
to generic unicode fonts. I'm glad you worked out a solution, but I
don't understand why there is a problem. MathJax's detection of fonts
is a bit fragile, so it may be that something in the landscape mode
was interfering with that initially. Something for me to look into in
the future.
Davide
the imageFont: null is something I will try out and see if it solves the apparent bug I say.
About the bug: note that the landscape iPhone version had no problem at all, it was the portrait that ran into a problem. If you want more details, just ask and I will be happy to send them over (screenshots of the error messages or a screen recording of the error).
Would be happy to help.
Best - Joel
Right. I read your page too quickly. Sorry about that.
The font testing is a bit fragile. MathJax uses large versions of the
fonts, so perhaps the test strings are too wide to fit in the small
portrait screen. I will have to do some testing.
> If you want more details, just ask and I will be happy to send them
> over (screenshots of the error messages or a screen recording of the
> error).
Thanks for your offer to help. I may send you some things to try out,
when I get the chance to figure out what to try.
Davide
In the configuration file that I am using (TeX-AMS_HTML-full) I added
imageFont:null
but this had no impact on Mathjax trying to load imageFont.js after I turned my re-sizing workaround out.
Clarification about the Bug: it is not only about trying to load the image fonts.
> Bugs:
> - MathJax would try to load the image fonts in portrait mode but would
> not do so in landscape mode. I decided not to jump into MathJax code
> but to trick MathJax into thinking that it did not need to load the
> image fonts: in portrait mode the Web View is 480 pt wide for a short
> period of time (~0.5s) and then silently animate it to 320 pt. It
> worked.
Error messages
1- Loading \WebFont TeX/Main/Regular
2- Loading /[MathJax]jax/output/HTML-CSS/imageFonts.js
3- All equations on the page display [Math Processing Error] in red.
This problem is not encountered when opening the view in the landscape orientation.
This must be in the "HTML-CSS" block of your configuration. So it
would be something like
MathJax.Hub.Config({
"HTML-CSS": {
imageFont: null
}
});
> but this had no impact on Mathjax trying to load imageFont.js after
> I turned my re-sizing workaround out.
This should prevent that (but it will just default to a generic
unicode configuration, which isn't what you want, either).
> Clarification about the Bug: it is not only about trying to load the
> image fonts.
Yes, but I was just trying to be clear about how one should handle not
installing the image fonts in general (since others will read this
thread in the future).
>> Bugs:
>> - MathJax would try to load the image fonts in portrait mode but
>> would
>> not do so in landscape mode. I decided not to jump into MathJax code
>> but to trick MathJax into thinking that it did not need to load the
>> image fonts: in portrait mode the Web View is 480 pt wide for a short
>> period of time (~0.5s) and then silently animate it to 320 pt. It
>> worked.
>
>
> Error messages
> 1- Loading \WebFont TeX/Main/Regular
> 2- Loading /[MathJax]jax/output/HTML-CSS/imageFonts.js
> 3- All equations on the page display [Math Processing Error] in red.
>
> This problem is not encountered when opening the view in the
> landscape orientation.
I think it may be that some of the tests for the fonts use large font
sizes and wide texts, and it might be that they are wrapping, which is
causing the font detection to fail. I'll have to look into it further.
Davide