mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-01-12 02:19:31 +08:00
allow changing the font glyph spacing
This commit is contained in:
parent
65edb7081a
commit
875e3e4859
12
CHANGELOG.md
12
CHANGELOG.md
@ -4,8 +4,11 @@
|
|||||||
Thanks to **[Nemirtingas]** for the amazing project: https://github.com/Nemirtingas/ingame_overlay
|
Thanks to **[Nemirtingas]** for the amazing project: https://github.com/Nemirtingas/ingame_overlay
|
||||||
* for Linux: new experimental build of the emu with overlay support
|
* for Linux: new experimental build of the emu with overlay support
|
||||||
currently only *some* 64-bit games using OpenGL will work
|
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 a new method to initialize the overlay on a separate thread with a configurable initialization delay and renderer detection timeout
|
||||||
use the new config file `overlay_hook_delay_sec.txt` to control this delay, check the updated `README`
|
- 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:
|
* added builtin fonts to properly render all overlay translations:
|
||||||
- `NotoSansJP-SemiBold`: for japanese
|
- `NotoSansJP-SemiBold`: for japanese
|
||||||
- `NotoSansKR-SemiBold`: for korean
|
- `NotoSansKR-SemiBold`: for korean
|
||||||
@ -13,6 +16,11 @@
|
|||||||
- `NotoSansTC-SemiBold`: for traditional chinese
|
- `NotoSansTC-SemiBold`: for traditional chinese
|
||||||
- `NotoSansThai-SemiBold`: for Thai
|
- `NotoSansThai-SemiBold`: for Thai
|
||||||
- `Google-Roboto-Medium`: for other languages
|
- `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,
|
* removed the source files of the ingame overlay project, it is now a dependency,
|
||||||
**rebuild your dependencies!**
|
**rebuild your dependencies!**
|
||||||
* removed the code which locks the cursor inside the overlay window
|
* removed the code which locks the cursor inside the overlay window
|
||||||
|
@ -120,22 +120,30 @@ struct Overlay_Appearance {
|
|||||||
|
|
||||||
float font_size = 13.5f;
|
float font_size = 13.5f;
|
||||||
float icon_size = 64.0f;
|
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_r = 0.16f;
|
||||||
float notification_g = 0.29f;
|
float notification_g = 0.29f;
|
||||||
float notification_b = 0.48f;
|
float notification_b = 0.48f;
|
||||||
float notification_a = 1.0f;
|
float notification_a = 1.0f;
|
||||||
|
|
||||||
float background_r = -1.0f;
|
float background_r = -1.0f;
|
||||||
float background_g = -1.0f;
|
float background_g = -1.0f;
|
||||||
float background_b = -1.0f;
|
float background_b = -1.0f;
|
||||||
float background_a = -1.0f;
|
float background_a = -1.0f;
|
||||||
|
|
||||||
float element_r = -1.0f;
|
float element_r = -1.0f;
|
||||||
float element_g = -1.0f;
|
float element_g = -1.0f;
|
||||||
float element_b = -1.0f;
|
float element_b = -1.0f;
|
||||||
float element_a = -1.0f;
|
float element_a = -1.0f;
|
||||||
|
|
||||||
float element_hovered_r = -1.0f;
|
float element_hovered_r = -1.0f;
|
||||||
float element_hovered_g = -1.0f;
|
float element_hovered_g = -1.0f;
|
||||||
float element_hovered_b = -1.0f;
|
float element_hovered_b = -1.0f;
|
||||||
float element_hovered_a = -1.0f;
|
float element_hovered_a = -1.0f;
|
||||||
|
|
||||||
float element_active_r = -1.0f;
|
float element_active_r = -1.0f;
|
||||||
float element_active_g = -1.0f;
|
float element_active_g = -1.0f;
|
||||||
float element_active_b = -1.0f;
|
float element_active_b = -1.0f;
|
||||||
|
@ -109,6 +109,14 @@ static void load_overlay_appearance(std::string appearance_filepath, Settings *s
|
|||||||
float nicon_size = std::stof(value, NULL);
|
float nicon_size = std::stof(value, NULL);
|
||||||
settings_client->overlay_appearance.icon_size = nicon_size;
|
settings_client->overlay_appearance.icon_size = nicon_size;
|
||||||
settings_server->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) {
|
} else if (name.compare("Notification_R") == 0) {
|
||||||
float nnotification_r = std::stof(value, NULL);
|
float nnotification_r = std::stof(value, NULL);
|
||||||
settings_client->overlay_appearance.notification_r = nnotification_r;
|
settings_client->overlay_appearance.notification_r = nnotification_r;
|
||||||
|
@ -234,6 +234,9 @@ void Steam_Overlay::create_fonts()
|
|||||||
font_cfg.OversampleH = 1;
|
font_cfg.OversampleH = 1;
|
||||||
font_cfg.OversampleV = 1;
|
font_cfg.OversampleV = 1;
|
||||||
font_cfg.SizePixels = font_size;
|
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{};
|
static ImFontGlyphRangesBuilder font_builder{};
|
||||||
for (auto &x : achievements) {
|
for (auto &x : achievements) {
|
||||||
|
@ -450,7 +450,7 @@ The notifications positions could be set to one of these values:
|
|||||||
* `bot_center`
|
* `bot_center`
|
||||||
* `bot_right`
|
* `bot_right`
|
||||||
|
|
||||||
Check the example files in the `steam_settings` folder
|
Check the example file in the `steam_settings` folder
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
Font_Size 13.5
|
Font_Size 13.5
|
||||||
Icon_Size 64.0
|
Icon_Size 64.0
|
||||||
|
|
||||||
|
Font_Glyph_Extra_Spacing_x 1.0
|
||||||
|
Font_Glyph_Extra_Spacing_y 0.0
|
||||||
|
|
||||||
Notification_R 0.16
|
Notification_R 0.16
|
||||||
Notification_G 0.29
|
Notification_G 0.29
|
||||||
Notification_B 0.48
|
Notification_B 0.48
|
||||||
|
Loading…
x
Reference in New Issue
Block a user