MCPcopy Create free account
hub / github.com/NanoMichael/MicroTeX / createFont

Method createFont

src/render.cpp:98–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98DefaultTeXFont* TeXRenderBuilder::createFont(float size, int type) {
99 DefaultTeXFont* tf = new DefaultTeXFont(size);
100 if (type == 0) tf->setSs(false);
101 if ((type & ROMAN) != 0) tf->setRoman(true);
102 if ((type & TYPEWRITER) != 0) tf->setTt(true);
103 if ((type & SANSSERIF) != 0) tf->setSs(true);
104 if ((type & ITALIC) != 0) tf->setIt(true);
105 if ((type & BOLD) != 0) tf->setBold(true);
106 return tf;
107}
108
109TeXRender* TeXRenderBuilder::build(TeXFormula& f) {
110 return build(f._root);

Callers

nothing calls this directly

Calls 5

setSsMethod · 0.80
setRomanMethod · 0.80
setTtMethod · 0.80
setItMethod · 0.80
setBoldMethod · 0.80

Tested by

no test coverage detected