* @target web
()
| 313 | * @target web |
| 314 | */ |
| 315 | private static _detectFontDirectory(): string | null { |
| 316 | if (!Environment.isRunningInWorker && Environment.globalThis.ALPHATAB_FONT) { |
| 317 | return Environment.ensureFullUrl(Environment.globalThis.ALPHATAB_FONT); |
| 318 | } |
| 319 | |
| 320 | const scriptFile = Environment.scriptFile; |
| 321 | if (scriptFile) { |
| 322 | const lastSlash: number = scriptFile.lastIndexOf(String.fromCharCode(47)); |
| 323 | if (lastSlash >= 0) { |
| 324 | return `${scriptFile.substr(0, lastSlash)}/font/`; |
| 325 | } |
| 326 | } |
| 327 | |
| 328 | return null; |
| 329 | } |
| 330 | |
| 331 | /** |
| 332 | * @target web |
no test coverage detected