From 4ae3e555edf0a32adc902ff8947133dcd8bbb09a Mon Sep 17 00:00:00 2001 From: SuperUserNameMan <9801802+SuperUserNameMan@users.noreply.github.com> Date: Tue, 23 Jul 2024 17:57:05 +0200 Subject: [PATCH] `rcore.c` : flags to control texture font linear filtering - part 2 When in `FLAT_RESCALE_CONTENT` mode, the default "nearest pixel" filter of the texture font is ugly sometimes. So this change adds `FLAG_RESCALE_CONTENT_LINEAR` and `FLAG_TEXT_LINEAR_FILTER` to offer more control. `FLAG_TEXT_LINEAR_FILTER` can also be used to disable the linear filtering of `FLAG_WINDOW_HIGHDPI`. --- src/rcore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rcore.c b/src/rcore.c index 428625ab1..17f2174ce 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -677,7 +677,7 @@ void InitWindow(int width, int height, const char *title) #endif #endif #if defined(SUPPORT_MODULE_RTEXT) && defined(SUPPORT_DEFAULT_FONT) - if ((CORE.Window.flags & FLAG_WINDOW_HIGHDPI) > 0) + if (((CORE.Window.flags & FLAG_WINDOW_HIGHDPI) > 0) || ((CORE.Window.flags & FLAG_TEXT_LINEAR_FILTER) > 0)) { // Set default font texture filter for HighDPI (blurry) // RL_TEXTURE_FILTER_LINEAR - tex filter: BILINEAR, no mipmaps