MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / loadCustomFonts

Function loadCustomFonts

src/lib/fonts.js:157–170  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

155}
156
157function loadCustomFonts() {
158 try {
159 const customFonts = localStorage.getItem(CUSTOM_FONTS_KEY);
160 if (customFonts) {
161 const parsed = JSON.parse(customFonts);
162 for (const [name, css] of Object.entries(parsed)) {
163 fonts.set(name, css);
164 customFontNames.add(name);
165 }
166 }
167 } catch (error) {
168 console.error("Failed to load custom fonts:", error);
169 }
170}
171
172function get(name) {
173 return fonts.get(name);

Callers 1

fonts.jsFile · 0.85

Calls 3

setMethod · 0.80
addMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected