I am trying to load custom font but it doesn’t load at first i tried this code
from pyray import *
init_window(900,900,"Hello")
font = load_font_ex("main.ttf", 32, 0, 250)
while not window_should_close():
begin_drawing()
clear_background(WHITE)
draw_text_ex(font, "Hello", Vector2(100, 100), 68, 10, BLACK)
end_drawing()
It throwed the error font = load_font_ex("main.ttf", 32, 0, 250) File "/home/himanshu/.local/lib/python3.10/site-packages/pyray/__init__.py", line 76, in wrapped_func raise TypeError( TypeError: Argument must be a ctype int, please create one with: pyray.ffi.new('int *', 1)
Then I tried the below thing
from pyray import *
import pyray
from raylib import *
init_window(900,900,"Hello")
font_size = pyray.ffi.new('int *', 32)
font_style = pyray.ffi.new('int *', 0)
font_spacing = pyray.ffi.new('int *', 250)
font = load_font_ex("main.ttf".encode(),font_size, font_style, font_spacing)
while not window_should_close():
begin_drawing()
clear_background(WHITE)
draw_text_ex(font, "Hello", Vector2(100, 100), 68, 10, BLACK)
end_drawing()
then it throws this error
I want to just load a simple ttf file which is clear and not blurr because when i tried on windows it was blurr. someone please help