MCPcopy Index your code
hub / github.com/microsoft/SandDance / font

Function font

docs/app/js/sanddance-app.js:122921–122923  ·  view source on GitHub ↗
(item, quote)

Source from the content-addressed store, hash-verified

122919 return (quote && font1 ? String(font1).replace(/"/g, "'") : font1) || "sans-serif";
122920}
122921function font(item, quote) {
122922 return "" + (item.fontStyle ? item.fontStyle + " " : "") + (item.fontVariant ? item.fontVariant + " " : "") + (item.fontWeight ? item.fontWeight + " " : "") + fontSize(item) + "px " + fontFamily(item, quote);
122923}
122924function offset(item) {
122925 // perform our own font baseline calculation
122926 // why? not all browsers support SVG 1.1 'alignment-baseline' :(

Callers 4

measureWidthFunction · 0.70
widthGetterFunction · 0.70
drawFunction · 0.70
cloudFunction · 0.70

Calls 2

fontSizeFunction · 0.70
fontFamilyFunction · 0.70

Tested by

no test coverage detected