Ver a proveniência

Fix font syncing

Ignore importing tailwind config for score renderer.
master
TheoryOfNekomata há 7 meses
ascendente
cometimento
0c1f6ed2c5
1 ficheiros alterados com 2 adições e 1 eliminações
  1. +2
    -1
      src/pages/scores/[asset].svg.ts

+ 2
- 1
src/pages/scores/[asset].svg.ts Ver ficheiro

@@ -4,7 +4,7 @@ import { readFile, readdir } from 'node:fs/promises';
import { JSDOM } from 'jsdom';
import type {APIRoute, GetStaticPaths} from 'astro';
// @ts-ignore
import tailwindConfig from '../../../tailwind.config.mjs';
import tailwindConfigRaw from '../../../tailwind.config.mjs';

const filter = (musicXml: string) => {
const jsdom = new JSDOM(musicXml, { pretendToBeVisual: true, contentType: 'image/svg+xml' });
@@ -41,6 +41,7 @@ const processOutput = (xmlData: string) => {
return;
}
if (h.tagName.toLowerCase() === 'style') {
const tailwindConfig = tailwindConfigRaw as any;
h.innerHTML = h.innerHTML.replace(/Times,serif/g, tailwindConfig.theme.fontFamily.body.join(','));
}
if (svgElemsMain.children[0]) {


Carregando…
Cancelar
Guardar