Added a section on local files and Firefox
This commit is contained in:
parent
5afdd65b07
commit
7d71307be0
|
@ -229,3 +229,26 @@ discussion of `web-font linking
|
||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
|
|
||||||
|
.. _ff-local-fonts:
|
||||||
|
|
||||||
|
Forefox and Local Fonts
|
||||||
|
=======================
|
||||||
|
|
||||||
|
Firefox's same-origin security policy affects its ability to load
|
||||||
|
web-based fonts, as described above. This has implications not only
|
||||||
|
to cross-domain loading of MathJax, but also to using MathJax locally
|
||||||
|
from your hard disk. Firefox's interpretation of the same-origin
|
||||||
|
policy for local files is that the "same domain" for a page is the
|
||||||
|
directory where that page exists, or any of its subdirectories. So if
|
||||||
|
you use MathJax in a page with a ``file://`` URL, and if MathJax is
|
||||||
|
loaded from a diretory other than the one containing the original
|
||||||
|
page, then MathJax will not be able to access the web-based fonts in
|
||||||
|
Firefox. In that case, MathJax will fall back on image fonts to
|
||||||
|
display the mathematics.
|
||||||
|
|
||||||
|
In order for Firefox to be able to load the fonts properly for a local
|
||||||
|
file, your MathJax installation must be in a subdirectory of the one
|
||||||
|
containing the page that uses MathJax. This is an unfortunate
|
||||||
|
restriction, but it is a limitiation imposed by Firefox's security
|
||||||
|
model that MathJax can not circumvent. Currently, this is not a
|
||||||
|
problem for other browsers.
|
||||||
|
|
|
@ -106,7 +106,7 @@ MathML that works in all modern browsers.</p>
|
||||||
<li><a class="reference internal" href="search.html"><em>Search</em></a></li>
|
<li><a class="reference internal" href="search.html"><em>Search</em></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<hr class="docutils" />
|
<hr class="docutils" />
|
||||||
<p>This version of the documentation was built December 31, 2010.</p>
|
<p>This version of the documentation was built January 08, 2011.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -223,6 +223,26 @@ download the fonts from this site. See the open font library
|
||||||
discussion of <a class="reference external" href="http://openfontlibrary.org/wiki/Web_Font_linking_and_Cross-Origin_Resource_Sharing">web-font linking</a>
|
discussion of <a class="reference external" href="http://openfontlibrary.org/wiki/Web_Font_linking_and_Cross-Origin_Resource_Sharing">web-font linking</a>
|
||||||
for more details.</p>
|
for more details.</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="section" id="forefox-and-local-fonts">
|
||||||
|
<span id="ff-local-fonts"></span><h2>Forefox and Local Fonts<a class="headerlink" href="#forefox-and-local-fonts" title="Permalink to this headline">¶</a></h2>
|
||||||
|
<p>Firefox’s same-origin security policy affects its ability to load
|
||||||
|
web-based fonts, as described above. This has implications not only
|
||||||
|
to cross-domain loading of MathJax, but also to using MathJax locally
|
||||||
|
from your hard disk. Firefox’s interpretation of the same-origin
|
||||||
|
policy for local files is that the “same domain” for a page is the
|
||||||
|
directory where that page exists, or any of its subdirectories. So if
|
||||||
|
you use MathJax in a page with a <tt class="docutils literal"><span class="pre">file://</span></tt> URL, and if MathJax is
|
||||||
|
loaded from a diretory other than the one containing the original
|
||||||
|
page, then MathJax will not be able to access the web-based fonts in
|
||||||
|
Firefox. In that case, MathJax will fall back on image fonts to
|
||||||
|
display the mathematics.</p>
|
||||||
|
<p>In order for Firefox to be able to load the fonts properly for a local
|
||||||
|
file, your MathJax installation must be in a subdirectory of the one
|
||||||
|
containing the page that uses MathJax. This is an unfortunate
|
||||||
|
restriction, but it is a limitiation imposed by Firefox’s security
|
||||||
|
model that MathJax can not circumvent. Currently, this is not a
|
||||||
|
problem for other browsers.</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,6 +259,7 @@ for more details.</p>
|
||||||
<li><a class="reference internal" href="#obtaining-mathjax-via-an-archive">Obtaining MathJax via an archive</a></li>
|
<li><a class="reference internal" href="#obtaining-mathjax-via-an-archive">Obtaining MathJax via an archive</a></li>
|
||||||
<li><a class="reference internal" href="#testing-your-installation">Testing your installation</a></li>
|
<li><a class="reference internal" href="#testing-your-installation">Testing your installation</a></li>
|
||||||
<li><a class="reference internal" href="#notes-about-shared-installations">Notes about shared installations</a></li>
|
<li><a class="reference internal" href="#notes-about-shared-installations">Notes about shared installations</a></li>
|
||||||
|
<li><a class="reference internal" href="#forefox-and-local-fonts">Forefox and Local Fonts</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -229,3 +229,26 @@ discussion of `web-font linking
|
||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
|
|
||||||
|
.. _ff-local-fonts:
|
||||||
|
|
||||||
|
Forefox and Local Fonts
|
||||||
|
=======================
|
||||||
|
|
||||||
|
Firefox's same-origin security policy affects its ability to load
|
||||||
|
web-based fonts, as described above. This has implications not only
|
||||||
|
to cross-domain loading of MathJax, but also to using MathJax locally
|
||||||
|
from your hard disk. Firefox's interpretation of the same-origin
|
||||||
|
policy for local files is that the "same domain" for a page is the
|
||||||
|
directory where that page exists, or any of its subdirectories. So if
|
||||||
|
you use MathJax in a page with a ``file://`` URL, and if MathJax is
|
||||||
|
loaded from a diretory other than the one containing the original
|
||||||
|
page, then MathJax will not be able to access the web-based fonts in
|
||||||
|
Firefox. In that case, MathJax will fall back on image fonts to
|
||||||
|
display the mathematics.
|
||||||
|
|
||||||
|
In order for Firefox to be able to load the fonts properly for a local
|
||||||
|
file, your MathJax installation must be in a subdirectory of the one
|
||||||
|
containing the page that uses MathJax. This is an unfortunate
|
||||||
|
restriction, but it is a limitiation imposed by Firefox's security
|
||||||
|
model that MathJax can not circumvent. Currently, this is not a
|
||||||
|
problem for other browsers.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user