Add more documentation on font loading & prefetch fonts on the website (#1895)

* Add more documentation on font loading

* Prefetch fonts on the website
This commit is contained in:
ylemkimon
2019-04-29 07:44:34 +09:00
committed by Kevin Barabash
parent 5806b240b3
commit 664dc6ab74
5 changed files with 84 additions and 15 deletions

View File

@@ -1,6 +1,17 @@
/* eslint-disable no-var */
/* global katex: false */
/* global ClipboardJS: false */
// load fonts
window.WebFontConfig = {
custom: {
families: ['KaTeX_AMS', 'KaTeX_Caligraphic:n4,n7', 'KaTeX_Fraktur:n4,n7',
'KaTeX_Main:n4,n7,i4,i7', 'KaTeX_Math:i4,i7', 'KaTeX_Script',
'KaTeX_SansSerif:n4,n7,i4', 'KaTeX_Size1', 'KaTeX_Size2', 'KaTeX_Size3',
'KaTeX_Size4', 'KaTeX_Typewriter'],
},
};
(function() {
var tex = document.getElementsByClassName("tex");
Array.prototype.forEach.call(tex, function(el) {