-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web installation causes error on Google Chrome / Ubuntu #546
Comments
Thanks for reporting this finding. The error already explains why you do not see the anything rendered: You need to have the font "Georgia" installed on your system. But there is maybe a bit more needed to fully understand how this is caused and resolved: alphaTab waits until all configured fonts are loaded before rendering. This is required for various operations (text measuring, and avoiding strange symbols displayed on HTML5 canvas rendering) and this also allows also the usage of custom Web Fonts together with alphatab. The default fonts of alphaTab are listed on the following page and can be customized: Unfortunately on Linux distributions there is not much consistency on what is shipped. Most other operating systems (at least all I tested in the past via BrowserStack) were working fine. If you need to support Ubuntu, I recommend configuring the fonts. I will close this bug report as it is per-design and no bug. Feel free to open a discussion or a feature request if you have ideas on how alphaTab can be improved to fit your needs out of the box. |
Thanks. I think there is more to dig here because it works correctly on Firefox on the same machine / OS as per the original report. |
@infojunkie have you solved it? For me it's only working in Firefox too. |
No, the maintainer seems to think it's a client configuration issue, so I didn't consider this project further. |
@juandspy You could simply configure other fonts where you know they are available on the operating systems you are targeting: https://alphatab.net/docs/reference/settings/display/resources/ Georgia as serif-font is just the defaults we ship but you can easily adjust it using the settings. But whatever you configure as font, you need to ensure somehow that it is available on the client machine. e.g. by using WebFonts.We are using the CSS Font Loading APIs to detect whether fonts are ready and loaded before we do any rendering. This is needed for layouting purposes (and of course on raster graphics like HTML5 canvas to draw correctly). Technically there would be the possibility to add support for font lists, but considering the feedback on this topic there was not much interest or need. |
@Danielku15 I will try that. Thanks for the explanation! Apart from that, it's interesting that:
|
Reopening this issue to investigate further and provide a solution to it. Especially the info from @juandspy is interesting: It should work consistently in the browsers. |
Please, ping me if you need anything from my side @Danielku15 . |
Would be good to know what exact distro and Browser Versions you were testing with. I would have started now simply with the latest Ubuntu to see how it behaves (unfortunately Browserstack does not have Linux distros so I have to setup a local VM 😞 ) |
@Danielku15 I'm using Fedora 35. It's not a clean installation as I've been using it for some months. The browser versions are:
|
Interesting. I tried with: const settings = {
file: "{{include.source}}",
player: {
enablePlayer: true,
soundFont: "https://cdn.jsdelivr.net/npm/@coderline/alphatab@latest/dist/soundfont/sonivox.sf2",
scrollElement: wrapper.querySelector('.at-viewport')
},
display: {
resources: {
wordsFonts: 'Noto Serif'
}
}
};
const api = new alphaTab.AlphaTabApi(main, settings); but it still says |
@juandspy Sorry for the late response on your last question. You only changed one setting from Georgia to Noto and therefore it still waits for Georgia to be there. Notice the defaults here: https://alphatab.net/docs/reference/settings/display/resources/#resources I made now in 1.3 an improvement where we support font lists and we ship now by default a config like |
thanks a lot @Danielku15 ! When is the 1.3 release including these changes? |
@juandspy I have no committed date for the release. Mainly due to heavy obstacles with Kotlin the 1.3 is already delayed. That's why I plan an intermediate 1.2.3 release with various fixes and improvements I made in the meanwhile. But also for 1.2.3 I have no committed date. It heavily depends on my available time to work on alphaTab and how many other bugs are reprorted on 1.2 which might need to go into 1.2.3 |
Expected Results
Following the instructions at https://www.alphatab.net/docs/getting-started/installation-web/ should generate a rendered score.
Observed Results
Following the instructions at https://www.alphatab.net/docs/getting-started/installation-web/ generates the error
that keeps repeating every 5 seconds.
Steps to Reproduce
Further details
Works correctly on Firefox 85.0.1 (64-bit)
Your environment
Version
Flavor
System
Google Chrome Version 88.0.4324.150 (Official Build) (64-bit)
Ubuntu 20.04
The text was updated successfully, but these errors were encountered: