Fontconfig error: Cannot load default config file
Hi, I recently started with repl.it and I'm getting this error while using canvas in node.js. Is there a solution? In the image, all the characters are squares
Thanks in advance
Voters
PasinduRanasing (0)
Nice! This is what I've been looking for.
Abdullah2222 (0)
thx Coder100
Abdullah2222 (0)
thank u so mush
FishyFlick (0)
could u help me @Coder100
(node:340) UnhandledPromiseRejectionWarning: ReferenceError: registerFont is not defined
Coder100 (17045)
hello, i think it has been fixed on discord? @FishyFlick
FishyFlick (0)
ye ty <3 @Coder100
JabalanProducti (0)
@Coder100 i got same problem to -_-
JabalanProducti (0)
can you help me? @Coder100
Hello, that is because there is no default font with repl.it. I have experienced this with my code on
canvas
too, and I have created a solution.registerFont
Append this line and don't replace it with previous imports.
Install a font.
Go to like google fonts and then choose a font and install it. Then, unzip the folder and then drag the fonts in question to your repl.
Register the font.
Hopes this helps! Be sure to accept it as the correct answer if it worked for you!
@Coder100
Thanks! I will add it and see if it works
no problem! @Trunks8257
@Coder100
it worked, thank you!!!
yay!!! no problem!!! What font did you use? @Trunks8257
@Coder100
Semi Bold Open Sans
nice! That's a good font! @Trunks8257
@Coder100
yes, and I can use it thanks to you
@Coder100 I'm still getting an error:
Fontconfig error: Cannot load default config file
Hmm send repl @OctagonalT
@Coder100 Link?
Yes @OctagonalT
@Coder100 here ya go
Thx @OctagonalT
Is the error fatal? @OctagonalT
@Coder100 no, the program continues
hmm, I am going to jump the conclusion that if that error only prints text, and your canvas works fine, you can safely ignore it @OctagonalT
@Coder100 There's no text on the canvas
(dont judge the image pls)
@OctagonalT wher
@Coder100 It should have the text "hi" somewhere (its for testing) but there isn't
hmm, can I make a quick repl and see if it works? @OctagonalT
@Coder100 Sure
https://repl.it/@Coder100/img-REplit-pog-image-api-poggers#test.png
I DID IT
@OctagonalT
@Coder100 Can you tell me what needs to be changed for my repl?
(also sorry for not responding i had to go)
your text is white lol @OctagonalT
@Coder100 oh- shi-
lol bad eyes go brr @OctagonalT
i definitely could see the textThanks dude @Coder100
:D np @OctagonalT
Thanks c:
@Coder100
i got the same issue could u explain wha file
t i have to add in my fonts
could u send ur rep
@Coder100