some fonts

This commit is contained in:
2026-04-15 21:46:06 -07:00
parent 5d82e92461
commit 0cb2a7739a
15 changed files with 4 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -2,6 +2,7 @@
import { useSpacetimeDB, useTable, useReducer } from "spacetimedb/svelte"; import { useSpacetimeDB, useTable, useReducer } from "spacetimedb/svelte";
import { tables, reducers } from "$lib/st-bindings"; import { tables, reducers } from "$lib/st-bindings";
import JASSUB from "jassub"; import JASSUB from "jassub";
import font1 from "$lib/assets/fonts/trebuc_0.ttf";
const conn = useSpacetimeDB(); const conn = useSpacetimeDB();
@@ -23,10 +24,12 @@
let jassubInstance: any | undefined; let jassubInstance: any | undefined;
$effect(() => { $effect(() => {
console.log("effect-1");
if (videoElement && videoState?.subtitleUrl && videoState.subtitleUrl.endsWith(".ass")) { if (videoElement && videoState?.subtitleUrl && videoState.subtitleUrl.endsWith(".ass")) {
jassubInstance = new JASSUB({ jassubInstance = new JASSUB({
video: videoElement, video: videoElement,
subUrl: videoState.subtitleUrl, subUrl: videoState.subtitleUrl,
fonts: [font1],
}); });
return () => { return () => {
@@ -46,6 +49,7 @@
} }
$effect(() => { $effect(() => {
console.log("effect-2");
if (!videoElement || !videoState) return; if (!videoElement || !videoState) return;
const el = videoElement; const el = videoElement;
const state = videoState; const state = videoState;