MCPcopy Index your code
hub / github.com/devforth/painterro / getFonts

Method getFonts

js/text.js:37–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35 }
36
37 getFonts() {
38 const fonts = [
39 'Arial, Helvetica, sans-serif',
40 '"Arial Black", Gadget, sans-serif',
41 '"Comic Sans MS", cursive, sans-serif',
42 'Impact, Charcoal, sans-serif',
43 '"Lucida Sans Unicode", "Lucida Grande", sans-serif',
44 'Tahoma, Geneva, sans-serif',
45 '"Trebuchet MS", Helvetica, sans-serif',
46 'Verdana, Geneva, sans-serif',
47 '"Courier New", Courier, monospace',
48 '"Lucida Console", Monaco, monospace',
49 ...this.main.params.extraFonts,
50 ];
51
52 const res = [];
53 fonts.forEach((f) => {
54 const fontName = f.split(',')[0].replace(/"/g, '');
55 res.push({
56 value: f,
57 name: fontName,
58 extraStyle: `font-family:${f}`,
59 title: fontName,
60 });
61 });
62 return res;
63 }
64
65 setFont(font) {
66 this.font = font;

Callers 2

constructorMethod · 0.95
constructorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected