#include int main(void) { const int screenWidth = 800; const int screenHeight = 450; SetConfigFlags(FLAG_VSYNC_HINT); SetConfigFlags(FLAG_WINDOW_RESIZABLE); SetConfigFlags(FLAG_WINDOW_HIGHDPI); const char *text = "zażółć gęślą jaźń"; int codePointCnt = 0; int *codePoints = LoadCodepoints(text, &codePointCnt); InitWindow(screenWidth, screenHeight, "raylib unicode"); Font font = LoadFontEx("resources/JetBrainsMono-Regular.ttf", 64, codePoints, codePointCnt); SetTargetFPS(60); while (!WindowShouldClose()) { if (IsKeyPressed(KEY_ONE)) { SetTextureFilter(font.texture, TEXTURE_FILTER_POINT); } else if (IsKeyPressed(KEY_TWO)) { SetTextureFilter(font.texture, TEXTURE_FILTER_BILINEAR); } else if (IsKeyPressed(KEY_THREE)) { // NOTE: Trilinear filter won't be noticed on 2D drawing SetTextureFilter(font.texture, TEXTURE_FILTER_TRILINEAR); } BeginDrawing(); ClearBackground(RAYWHITE); DrawText("zażółć gęślą jaźń", 190, 200, 20, LIGHTGRAY); DrawCircle(screenWidth / 5, 120, 35, DARKBLUE); DrawCircleLines(screenWidth / 5, 340, 80, DARKBLUE); DrawTextEx(font, text, (Vector2){20.0f, 100.0f}, (float)font.baseSize / 2, 2, LIME); EndDrawing(); } UnloadCodepoints(codePoints); UnloadFont(font); CloseWindow(); return 0; }