diff --git a/CHANGELOG.md b/CHANGELOG.md index 57de15d4..69d29534 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,11 @@ Thanks to **[Nemirtingas]** for the amazing project: https://github.com/Nemirtingas/ingame_overlay * for Linux: new experimental build of the emu with overlay support currently only *some* 64-bit games using OpenGL will work -* use a new method to initialize the overlay on a separate thread with a configurable initialization delay, - use the new config file `overlay_hook_delay_sec.txt` to control this delay, check the updated `README` +* use a new method to initialize the overlay on a separate thread with a configurable initialization delay and renderer detection timeout + - the new config file `overlay_hook_delay_sec.txt` controls the initial delay (default = `5 seconds`) + - the new config file `overlay_renderer_detector_timeout_sec.txt` controls the detection timeout (default = `15 seconds`) + + check the updated `README` * added builtin fonts to properly render all overlay translations: - `NotoSansJP-SemiBold`: for japanese - `NotoSansKR-SemiBold`: for korean @@ -13,6 +16,11 @@ - `NotoSansTC-SemiBold`: for traditional chinese - `NotoSansThai-SemiBold`: for Thai - `Google-Roboto-Medium`: for other languages +* added 2 new entries for the config file `overlay_appearance.txt` + - `Font_Glyph_Extra_Spacing_x`: controls the extra horizontal spacing of characters (default = 1.0) + - `Font_Glyph_Extra_Spacing_y`: controls the extra vertical spacing of characters (default = 0.0) + + the extra horizontal spacing is especially needed for non-latin characters, otherwise they are squeezed * removed the source files of the ingame overlay project, it is now a dependency, **rebuild your dependencies!** * removed the code which locks the cursor inside the overlay window diff --git a/dll/dll/settings.h b/dll/dll/settings.h index a791cbc1..a3e6be81 100644 --- a/dll/dll/settings.h +++ b/dll/dll/settings.h @@ -120,22 +120,30 @@ struct Overlay_Appearance { float font_size = 13.5f; float icon_size = 64.0f; + + float font_glyph_extra_spacing_x = 1.0f; + float font_glyph_extra_spacing_y = 0.0f; + float notification_r = 0.16f; float notification_g = 0.29f; float notification_b = 0.48f; float notification_a = 1.0f; + float background_r = -1.0f; float background_g = -1.0f; float background_b = -1.0f; float background_a = -1.0f; + float element_r = -1.0f; float element_g = -1.0f; float element_b = -1.0f; float element_a = -1.0f; + float element_hovered_r = -1.0f; float element_hovered_g = -1.0f; float element_hovered_b = -1.0f; float element_hovered_a = -1.0f; + float element_active_r = -1.0f; float element_active_g = -1.0f; float element_active_b = -1.0f; diff --git a/dll/settings_parser.cpp b/dll/settings_parser.cpp index f35a1eee..8bed1f30 100644 --- a/dll/settings_parser.cpp +++ b/dll/settings_parser.cpp @@ -109,6 +109,14 @@ static void load_overlay_appearance(std::string appearance_filepath, Settings *s float nicon_size = std::stof(value, NULL); settings_client->overlay_appearance.icon_size = nicon_size; settings_server->overlay_appearance.icon_size = nicon_size; + } else if (name.compare("Font_Glyph_Extra_Spacing_x") == 0) { + float size = std::stof(value, NULL); + settings_client->overlay_appearance.font_glyph_extra_spacing_x = size; + settings_server->overlay_appearance.font_glyph_extra_spacing_x = size; + } else if (name.compare("Font_Glyph_Extra_Spacing_y") == 0) { + float size = std::stof(value, NULL); + settings_client->overlay_appearance.font_glyph_extra_spacing_y = size; + settings_server->overlay_appearance.font_glyph_extra_spacing_y = size; } else if (name.compare("Notification_R") == 0) { float nnotification_r = std::stof(value, NULL); settings_client->overlay_appearance.notification_r = nnotification_r; diff --git a/overlay_experimental/steam_overlay.cpp b/overlay_experimental/steam_overlay.cpp index ee474be5..fb97d99b 100644 --- a/overlay_experimental/steam_overlay.cpp +++ b/overlay_experimental/steam_overlay.cpp @@ -234,6 +234,9 @@ void Steam_Overlay::create_fonts() font_cfg.OversampleH = 1; font_cfg.OversampleV = 1; font_cfg.SizePixels = font_size; + // non-latin characters look ugly and squeezed without this horizontal spacing + font_cfg.GlyphExtraSpacing.x = settings->overlay_appearance.font_glyph_extra_spacing_x; + font_cfg.GlyphExtraSpacing.y = settings->overlay_appearance.font_glyph_extra_spacing_y; static ImFontGlyphRangesBuilder font_builder{}; for (auto &x : achievements) { diff --git a/post_build/README.release.md b/post_build/README.release.md index c7c4f21b..884a2aa9 100644 --- a/post_build/README.release.md +++ b/post_build/README.release.md @@ -450,7 +450,7 @@ The notifications positions could be set to one of these values: * `bot_center` * `bot_right` -Check the example files in the `steam_settings` folder +Check the example file in the `steam_settings` folder --- diff --git a/post_build/steam_settings.EXAMPLE/overlay_appearance.EXAMPLE.txt b/post_build/steam_settings.EXAMPLE/overlay_appearance.EXAMPLE.txt index 31ed3608..83ade74f 100644 --- a/post_build/steam_settings.EXAMPLE/overlay_appearance.EXAMPLE.txt +++ b/post_build/steam_settings.EXAMPLE/overlay_appearance.EXAMPLE.txt @@ -1,6 +1,9 @@ Font_Size 13.5 Icon_Size 64.0 +Font_Glyph_Extra_Spacing_x 1.0 +Font_Glyph_Extra_Spacing_y 0.0 + Notification_R 0.16 Notification_G 0.29 Notification_B 0.48