Skip to content
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

an error with Unsupported OpenType #111

Open
luthor-li opened this issue Aug 12, 2024 · 2 comments
Open

an error with Unsupported OpenType #111

luthor-li opened this issue Aug 12, 2024 · 2 comments

Comments

@luthor-li
Copy link

image

@luthor-li
Copy link
Author

My method looks the same as the example project
`
//get file
getFile() {
this.loading = true;
downloadFile(this.fileToken).then((res) => {
this.fonts = [mainFont, aux1Font, aux2Font, aux3Font];

    this.dxfViewer = new DxfViewer(
      this.$refs.canvasContainer,
      this.dxfOptions
    );
    this.dxfUrl = URL.createObjectURL(res.data);
    this.loadDxf(this.dxfUrl);

    this.loading = false;
  });
},

//load file
async loadDxf(url) {
this.isLoading = true;
this.error = null;
try {
console.log("this.fonts==", this.fonts);
console.log("this.DxfViewerWorker==", DxfViewerWorker);
await this.dxfViewer.Load({
url,
fonts: this.fonts,
progressCbk: this._OnProgress.bind(this),
workerFactory: DxfViewerWorker,
});
} catch (error) {
console.warn(error);
this.error = error.toString();
} finally {
this.isLoading = false;
this.progressText = null;
this.progress = null;
this.curProgressPhase = null;
}
},`

@vagran
Copy link
Owner

vagran commented Aug 12, 2024

Hello,
This looks like some deployment problem. Please check your network requests corresponding to font files in the browser dev tools, seems that there is some HTML page returned there instead of font files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants