leif icon indicating copy to clipboard operation
leif copied to clipboard

font problem

Open AsaNekoo opened this issue 1 year ago • 9 comments

image image Just installed leif to try write small project, on first build even without trying to output text it trowing that error. After i saw that todo app with setup script but it wont help and it trowing same error.

AsaNekoo avatar May 31 '24 20:05 AsaNekoo

I just had this same issue on windows and I fixed it by moving the .leif/ folder to the right spot. It's just a path issue, so try copying or moving .leif to home/neko/ and you should be straight

yaboypax avatar Jun 01 '24 06:06 yaboypax

this should now be fixed as the install script copies the .leif folder automatically.

you can pull and reinstall or just move the .leif into /home/user and make sure that it belongs to your user.

cococry avatar Jun 01 '24 07:06 cococry

this should now be fixed as the install script copies the .leif folder automatically.

you can pull and reinstall or just move the .leif into /home/user and make sure that it belongs to your user.

there is a problem. .leif already here (I linked screenshot with ls -l in first comment). it cannot open it, even so it here

AsaNekoo avatar Jun 01 '24 11:06 AsaNekoo

do

sudo chown ~/.leif your_user:your_user

and see if it fixes it

cococry avatar Jun 01 '24 14:06 cococry

I installed Leif today and got the same error:

[LEIF ERROR]: Failed to open font file '/home/dana/.leif/assets/fonts/inter.ttf'
Segmentation fault

But the fix is pretty simple.

mkdir -p ~/.leif/assets/fonts #Create, if it doesn't exist, the folder you're looking for.
wget https://github.com/rsms/inter/releases/download/v3.19/Inter-3.19.zip #Download the font.
unzip Inter-3.19.zip -d Inter-3.19

Find the font you want in the Inter-3.19 folder. In my case the path was: /Inter-3.19/Inter Hinted for Windows/Desktop/Inter-Regular.ttf Inside the correct directory, copy the font to the directory that Leif is looking for.

cp Inter-Regular.ttf ~/.leif/assets/fonts/inter.ttf

rchristof avatar Jun 05 '24 04:06 rchristof

I installed Leif today and got the same error:


[LEIF ERROR]: Failed to open font file '/home/dana/.leif/assets/fonts/inter.ttf'

Segmentation fault

But the fix is pretty simple.


mkdir -p ~/.leif/assets/fonts #Create, if it doesn't exist, the folder you're looking for.

wget https://github.com/rsms/inter/releases/download/v3.19/Inter-3.19.zip #Download the font.

unzip Inter-3.19.zip -d Inter-3.19

Find the font you want in the Inter-3.19 folder.

In my case the path was: /Inter-3.19/Inter Hinted for Windows/Desktop/Inter-Regular.ttf

Inside the correct directory, copy the font to the directory that Leif is looking for.


cp Inter-Regular.ttf ~/.leif/assets/fonts/inter.ttf

are you on windows?

cococry avatar Jun 05 '24 05:06 cococry

yes. I'm using WSL with Ubuntu

rchristof avatar Jun 05 '24 05:06 rchristof

okay, and can you run leif?

cococry avatar Jun 05 '24 17:06 cococry

Managed to build with this for macos, copied .leif into ~. Still gives segmentation fault on lf_init_glfw function call after compiling. Screenshot 2024-08-11 at 09 56 48

n-freman avatar Aug 11 '24 04:08 n-freman