mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 12:01:23 +01:00
load dropins from local folder
This commit is contained in:
parent
e49d18f5ce
commit
e55588f313
3 changed files with 6 additions and 4 deletions
|
|
@ -286,9 +286,9 @@ async function getMapURL(type, options = {}) {
|
|||
const webSafe = ['Georgia', 'Times+New+Roman', 'Comic+Sans+MS', 'Lucida+Sans+Unicode', 'Courier+New', 'Verdana', 'Arial', 'Impact'];
|
||||
const fontsToLoad = usedFonts.filter((font) => !webSafe.includes(font));
|
||||
if (fontsToLoad.length) {
|
||||
const url = 'https://fonts.googleapis.com/css?family=' + fontsToLoad.join('|');
|
||||
const fontStyle = await GFontToDataURI(url);
|
||||
if (fontStyle) clone.select('defs').append('style').text(fontStyle.join('\n'));
|
||||
const url = "https://fonts.googleapis.com/css?family=" + fontsToLoad.join("|");
|
||||
const fontStyle = await convertFontToDataURI(url);
|
||||
if (fontStyle) clone.select("defs").append("style").text(fontStyle.join("\n"));
|
||||
}
|
||||
|
||||
clone.remove();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue