MCPcopy Index your code
hub / github.com/clips/pattern / _fontMixin

Function _fontMixin

pattern/canvas.js:2414–2430  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

2412// The text() function has optional parameters font, fontsize, fontweight, bold, italic, lineheight and align.
2413
2414function _fontMixin(options) {
2415 var s = _ctx.state;
2416 var o = options;
2417 if (options === undefined) {
2418 return [s.fontname, s.fontsize, s.fontweight, s.lineheight];
2419 } else {
2420 return [
2421 (o.font)? o.font : s.fontname,
2422 (o.fontsize !== undefined)? o.fontsize :
2423 (o.fontSize !== undefined)? o.fontSize : s.fontsize,
2424 (o.fontweight !== undefined)? o.fontweight :
2425 (o.fontWeight !== undefined)? o.fontWeight : s.fontweight,
2426 (o.lineheight !== undefined)? o.lineheight :
2427 (o.lineHeight !== undefined)? o.lineHeight : s.lineheight
2428 ];
2429 }
2430}
2431
2432/*--- TEXT -----------------------------------------------------------------------------------------*/
2433

Callers 2

textFunction · 0.85
textmetricsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…