gemini-viewer-examples icon indicating copy to clipboard operation
gemini-viewer-examples copied to clipboard

viewer.setFont失败no font loaded

Open HeJiaYue520 opened this issue 2 months ago • 1 comments

字体ttf是正常的,图纸视图可展示,字体显示失败,报no font loaded。 代码: await viewer.setFont([ './assets/fonts/arial.ttf',]) 和字体文件路径有关系吗?按照demo放在public文件下也不行

HeJiaYue520 avatar Oct 13 '25 04:10 HeJiaYue520

The font file should be located under public. If the failure reason is due to the path, you should be able to see the error via browser's develop tool -> network. Is there a snapshot from the console, that would help.

yanzexuan1 avatar Nov 04 '25 09:11 yanzexuan1