Skip to content

Failing to find font and soundfont files when hosting from a directory that isn't the root #1629

Answered by Danielku15
nimblespark asked this question in Q&A
Discussion options

You must be logged in to vote

You need to configure this setting according to your app:
https://www.alphatab.net/docs/reference/settings/core/fontdirectory

See also:
https://github.com/CoderLine/alphaTabSamplesWeb/blob/main/src/vite-vue/src/App.vue#L12
https://github.com/CoderLine/alphaTabSamplesWeb/blob/main/src/vite-react/src/App.tsx#L13

The fontDirectory setting is used to generate a style tag with the web font definitions:

src: url('${fontDirectory}Bravura.eot');

The soundFontUrl is used to load the file via Ajax:

request.open('GET', url, true, null, null);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nimblespark
Comment options

Answer selected by Danielku15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants