Adds font metrics to support font commands.

This is part 1 of 3.  Rendering, screenshots, MathML, and unit tests will
follow in susbequent pull requests.
This commit is contained in:
Kevin Barabash
2015-07-04 15:20:05 -06:00
parent 549c2bf858
commit 67147b18ac
6 changed files with 579 additions and 15 deletions

View File

@@ -48,22 +48,22 @@
}
.font-face('AMS', normal, normal);
// .font-face('Caligraphic', bold, normal);
// .font-face('Caligraphic', normal, normal);
// .font-face('Fraktur', bold, normal);
// .font-face('Fraktur', normal, normal);
.font-face('Caligraphic', bold, normal);
.font-face('Caligraphic', normal, normal);
.font-face('Fraktur', bold, normal);
.font-face('Fraktur', normal, normal);
.font-face('Main', bold, normal);
.font-face('Main', normal, italic);
.font-face('Main', normal, normal);
.font-face('Math', bold, italic);
// .font-face('Math', bold, italic);
.font-face('Math', normal, italic);
.font-face('Math', normal, normal);
// .font-face('Math', normal, normal);
// .font-face('SansSerif', bold, normal);
// .font-face('SansSerif', normal, italic);
// .font-face('SansSerif', normal, normal);
// .font-face('Script', normal, normal);
.font-face('SansSerif', normal, normal);
.font-face('Script', normal, normal);
.font-face('Size1', normal, normal);
.font-face('Size2', normal, normal);
.font-face('Size3', normal, normal);
.font-face('Size4', normal, normal);
// .font-face('Typewriter', normal, normal);
.font-face('Typewriter', normal, normal);

View File

@@ -53,10 +53,44 @@
font-style: italic;
}
.mathbf {
font-family: KaTeX_Main;
font-weight: bold;
}
.amsrm {
font-family: KaTeX_AMS;
}
.mathbb {
font-family: KaTeX_AMS;
}
.mathcal {
font-family: KaTeX_Caligraphic;
}
.mathfrak {
font-family: KaTeX_Fraktur;
}
.mathtt {
font-family: KaTeX_Typewriter;
}
.mathscr {
font-family: KaTeX_Script;
}
.mathsf {
font-family: KaTeX_SansSerif;
}
.mainit {
font-family: KaTeX_Main;
font-style: italic;
}
// This value is also used in fontMetrics.js, if you change it make sure the
// values match.
@ptperem: 10.0;