#Blurry text
1 messages · Page 1 of 1 (latest)
this is an 8x8 font and i am drawing it with a fontsize of 32
this is how i load the font
blend mode is BLEND_ALPHA_PREMULTIPLY
Yeah, you want to to load the font at the same size you draw it at.
LoadFont picks a fixed size for the cached texture
Use LoadFontEx
there is an item in the FAQ just for this
oh i see, thank you very much, i will try this
but how do you do if you want a text with a dynamic size? for exemple in a text editor when you zoom or unzoom. you call LoadFontEx with the new font size each time ? or you load once with a specific size ? if so, which one ?
that's up to you and what your needs are.
the best thing to do would be to load a font for every size you use. That will do no scaling.
If you don't want to do that, you can load at some big size and only scale down, that will minimize artificats.
raylib's font system is not perfect, it's very simple and mostly just there to get some basic text on the screen
I personally would not make a full text editor in raylib, or at least not use the built in font system.
it doesn't use all the spacing information from the fonts
A library like FTGL would be better for that task if you really want to make an OpenGL text editor
but I'd use Scintilla, and not raylib as the framework for a text editor.
raylib is focused on games and game-like things, it can be used for tooling too, but there are for sure some things it is not optimal for.