Closed tuncayyildirtanuk closed 1 week ago
@tuncayyildirtanuk Thanks for this report. From what I can tell, this error seems to be generated by the msdf-generator package and not per se by Blits. Obviously the Blits provided vite plugin is your gateway into this package, so it's still a valid issue to be aware of from the Blits perspective.
As an immediate solution / workaround, you could place the generated msdf font files (png and json) into your publics/fonts folder and reference those in the launch settings. That way the msdf generation step is skipped all together.
As for the error itself, it seems like a similar one that's been reported here: https://github.com/lightning-js/msdf-generator/issues/5 That one may be related to the node version used (16 whereas, 18 is marked as minimum). Could you verify the node version used in AWS CodeBuild platform?
Yes it is same issue like https://github.com/lightning-js/msdf-generator/issues/5
Node version is 18.19.0
Also I guess minimum node version might be 20.9.0
for the renderer
perspective?
I have updated and tried after the following change. Same issue.
You should be able to leave your font launch setting the same, just placing the generated json and png file in the correct location alongside your ttf should be enough.
Alternatively you can specify the location to the json file and the png file explicitly, like this:
{
family: 'lato',
type: 'msdf',
png: 'fonts/lato.png',
json: 'fonts/lato.json',
},
I have attempted the following scenarios, but the issue persists:
Hi, I just tested via blits version 1.0.2.
I would like to share results.
Ah, I don't think you can have 2 families with the same name in your fonts config. If you rename the msdf font to a different family name, it should work I think.
As for the font generation error, it seems like this is related to the nodeJS version (https://github.com/lightning-js/msdf-generator/issues/5#issuecomment-2262673440)
When configuring Vite via blitsVitePlugins, I encountered the following issue exclusively on the AWS CodeBuild platform.
As a workaround, I used only the preCompiler and temporarily removed the msdfGenerator.
Should we include msdfGenerator when building a Blits app?