Skip to content

Commit

Permalink
Merge pull request #2 from metrica-sports/fran/avoid-queueing-font-re…
Browse files Browse the repository at this point in the history
…solver-when-loading-fails

If font loading fails use default font
  • Loading branch information
FranCarrascosaMS authored Apr 25, 2024
2 parents 0e18aa3 + 3b7cafc commit 13dcd09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/troika-three-text/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@metrica-sports/troika-three-text",
"description": "SDF-based text rendering for Three.js",
"version": "1.0.0",
"version": "1.0.1",
"author": {
"name": "Metrica Sports",
"email": "info@metrica-sports.com"
Expand Down
1 change: 1 addition & 0 deletions packages/troika-three-text/src/FontResolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export function createFontResolver(fontParser, unicodeFontResolverClient) {
function doLoadFont(url, callback) {
const onError = err => {
console.error(`Failure loading font ${url}`, err)
callback({ supportsCodePoint: () => null })
}
try {
const request = new XMLHttpRequest()
Expand Down

0 comments on commit 13dcd09

Please sign in to comment.