From 76e0c57a93548dad9173dc7afca5bb54d7c302e9 Mon Sep 17 00:00:00 2001 From: Pascal Thomet Date: Thu, 11 Apr 2024 09:15:38 +0200 Subject: [PATCH] dpi_aware: add doc --- src/hello_imgui/dpi_aware.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/hello_imgui/dpi_aware.h b/src/hello_imgui/dpi_aware.h index 5a730bd7..b517e3be 100644 --- a/src/hello_imgui/dpi_aware.h +++ b/src/hello_imgui/dpi_aware.h @@ -54,10 +54,13 @@ struct DpiAwareParams float dpiWindowSizeFactor = 0.0f; // `fontRenderingScale` - // factor (that is either 1 or < 1.) by which fonts glyphs should be - // scaled at rendering time. - // On macOS retina screens, it will be 0.5, since macOS APIs hide - // the real resolution of the screen. + // factor (that is either 1 or < 1.) by which fonts glyphs should be scaled at rendering time. + // On macOS retina screens, it will be 0.5, since macOS APIs hide the real resolution of the screen. + // Changing this value will *not* change the visible font size on the screen, however it will + // affect the size of the loaded glyphs. + // For example, if fontRenderingScale=0.5 (which is the default on a macOS retina screen), + // a font size of 16 will be loaded as if it was 32, and will be rendered at half size. + // This leads to a better rendering quality on some platforms. float fontRenderingScale = 0.0f; // `dpiFontLoadingFactor`