XPost: linux.debian.maint.boot
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1037256#20
Above Message #20 approach might be too ad-hoc, it might be better to investigate more generic alternative.
just as PoC, it might be useful to apply custom style, but
this is just an idea and not fully confirmed yet.
From 22ba16ddf1f7246db8dd8da6deda53ef76f20a81 Mon Sep 17 00:00:00 2001
From: Kentaro Hayashi <
kenhys@xdump.org>
Date: Mon, 23 Dec 2024 23:26:17 +0900
Subject: [PATCH 1/2] gtk: support to apply custom styles with gtkrc
In the previous versions, it does not support
applying language specific custom style.
Without custom style, it can't resolve language specific
style issue such as Han unification.
Because of Han unification, wrong font typefaces are
rendered by default when you choose Japanese language
using GUI installer.
Most of typefaces are correct, but there are wrong
typefaces (Simplified Chinese) which is used for widget rendering.
Notably, even though "Continue" or "Back" button can't be rendered
correctly.
This issue [1] will not be solved by using DroidSansFallback.ttf
(which is shipped by fonts-android udeb) for Japanese.
It means that we need to switch font itself which contains Japanese
typeface to fix this issue.
In this commit, add fallback to apply custom gtkrc to
override existing style.
[1] Your Code Displays Japanese Wrong
https://heistak.github.io/your-code-displays-japanese-wrong/
Signed-off-by: Kentaro Hayashi <
kenhys@xdump.org>
---
src/modules/frontend/gtk/di.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/src/modules/frontend/gtk/di.c b/src/modules/frontend/gtk/di.c index a6cb38f1..843624d4 100644
--- a/src/modules/frontend/gtk/di.c
+++ b/src/modules/frontend/gtk/di.c
@@ -45,6 +45,7 @@
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
+#include <glib/gprintf.h>
#include "question.h"
#include "database.h"
@@ -355,6 +356,36 @@ static GtkTextDirection get_text_direction(struct frontend * fe)
return direction;
}
+/** Set language specific style explicitly
+ *
+ * @param fe cdebconf frontend
+ */
+static void set_language_specific_style(struct frontend *fe)
+{
+ gchar rc_language_path[PATH_MAX];
+ gchar * rc_contents;
+ gsize length;
+ char * language = cdebconf_gtk_get_text(fe, "debconf/language",
+ "Current language for installer"); + if (language) {
+ /* Apply language specific custom