[Scummvm-git-logs] scummvm master -> 55ea922d86e79c10c44700b2659c704411fc25ff

sev- noreply at scummvm.org
Mon Sep 2 10:20:30 UTC 2024


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
55ea922d86 QDENGINE: DT: Added Cyrillic font rendering


Commit: 55ea922d86e79c10c44700b2659c704411fc25ff
    https://github.com/scummvm/scummvm/commit/55ea922d86e79c10c44700b2659c704411fc25ff
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-09-02T12:19:59+02:00

Commit Message:
QDENGINE: DT: Added Cyrillic font rendering

Changed paths:
    engines/qdengine/debugger/debugtools.cpp


diff --git a/engines/qdengine/debugger/debugtools.cpp b/engines/qdengine/debugger/debugtools.cpp
index 5d1152ad9a8..9020184db91 100644
--- a/engines/qdengine/debugger/debugtools.cpp
+++ b/engines/qdengine/debugger/debugtools.cpp
@@ -20,6 +20,7 @@
  */
 
 #include "backends/imgui/imgui.h"
+#include "backends/imgui/imgui_fonts.h"
 
 #include "common/archive.h"
 #include "common/compression/unzip.h"
@@ -115,6 +116,16 @@ static void showScore() {
 }
 
 void onImGuiInit() {
+	ImGuiIO &io = ImGui::GetIO();
+
+	static const ImWchar cyrillic_ranges[] = {
+		0x0020, 0x00FF, // Basic Latin + Latin Supplement
+		0x0400, 0x04FF, // Cyrillic
+		0
+	};
+
+	io.FontDefault = ImGui::addTTFFontFromArchive("FreeSans.ttf", 16.0f, nullptr, cyrillic_ranges);;
+
 	_state = new ImGuiState();
 	memset(_state, 0, sizeof(ImGuiState));
 }




More information about the Scummvm-git-logs mailing list