Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

Hi Ray

I'm printing (Linux CUBS printer) on paper and use this test code snip, that works fine. 

// Raylib 5

    int x = 0;

    int y = 100;

    int fontsize = 16;

    char *getfont =  "arial.ttf"; // tried different fonts without success.

    Font font;

    font = LoadFontEx(getfont, fontsize, 0, 250);

    const char *t = "mimMIN";

    ImageDrawTextEx(&image, font, t, (Vector2){ x, y }, fontsize, 1, BLACK);

    const char *filename = "output.png";

    ExportImage(image, filename);

But I have issues with the sharpness of the letters, they become a bit blurred or unclear. I had similar issue month ago, when I printed from Windows using Raylib 4.5, but not using the same font from Notepad. I never got that problem solved.

Do you have a suggestion for what I can improve, if the problem at all is related to Raylib?

Thanks in advance.
Hobby programmer

I'm afraid there is not much it can be done in that regards. raylib uses stb_truetype for font rasterization. Afaik, it does not support better font rasterization options like ClearType hinting.

(+1)

I solved the issue by using an image of higher resolution and then print and it very fine.

Thanks for answer.