#Blurry text

1 messages · Page 1 of 1 (latest)

fringe spade
#

I am trying to draw a pixelart font and its blurry, i am rendering on a render texture and drawing that to the screen for the purpose of post processing.

#

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

obtuse wave
#

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

fringe spade
#

oh i see, thank you very much, i will try this

formal osprey
obtuse wave
#

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.