• Bug#1037256: debian-installer: GUI font for Japanese was incorrectly re

    From Cyril Brulebois@21:1/5 to All on Thu Jan 2 14:00:01 2025
    XPost: linux.debian.maint.boot

    Kentaro HAYASHI <kenhys@xdump.org> (2024-12-29):
    I've checked with 10pt MotoyaLCedar,VL Gothic and BIZ UDGothic.

    * MotoyaLCedar 9pt vs 10pt
    9pt: font typeface seems blurred, so it is a bit ugly.
    10pt: ugly blurred rendering was reduced. it has enough
    readability and visibility as others.

    * VL Gothic 10pt
    Compared to MotoyaLCedar 10pt, it might be hard to distinguish
    both of their typeface readability and visibility.

    * BIZ UDGothic 10pt
    It gives most neat and clear impression in readability and
    visibility, but it might be extra ordinary quality for D-I.

    With tweaking default font size, e.g. 9pt to 10pt, readability and
    visibility might be good enough with MotoyaLCedar in practical use
    case.

    Alright, thanks for all those tests, and for the summary + proposed
    plan of action. If we do implement the compression dance I proposed,
    switching to MotoyaLCedar shouldn't be a problem (~ neutral on the
    size front). I'll try and work on that before Trixie Alpha 2.

    ありがとうございます。


    Cheers,
    --
    Cyril Brulebois (kibi@debian.org) <https://debamax.com/>
    D-I release manager -- Release team member -- Freelance Consultant

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEtg6/KYRFPHDXTPR4/5FK8MKzVSAFAmd2jC4ACgkQ/5FK8MKz VSAXaA/7BUkm7+pB2mdbCP7K1+ZCiX2WL/T+T3/cd/kEfU3v3KiVrF24e0MCVBHQ 3osRNbBV+GcEDrOfmwD88wgoUee2h26fRP7VpDR0ACHAaEyBIVAiH1tzFxtD0TpQ UwSHFQQ+q2VgEPsNlzA/StUXvzfJDTOY4fSiIv/147hZpo4sTMooYtvQbK7mXLlP FOlalNNzH8/W01DAoDF2nJHfQPlIeeS2nqn167YuZTGP1maQa0MTOkgrSGxnIcOM 2qnfweoxT6he/aM+4MDLuVNU42DQRsxUHAGeaEVpb2oWIHLeau4LCXFcVtfcfKTl jxa8dfDCak2jqbDjnuyLZWvU3w9bevmuCUKskhrJmdT50MvA4nzrCwL+qZR2IX8y 1B4vT3eiTm7/NtHzaKUjsgMH73OHQ5spFqqYeaQuLLszi8dY9LGBVqSVRTo+T/1c 5Ab9D60kUszbagBDaan/0F7EwonRXhH28aXFm0YgzropqcdFJJgVAqgLJcFosLYD YTH0Wco/K0mMp6WOZItWdmEbFJ2ewOxQ0PeDey5qBm2X5q9eGXRj7UojArMS5JQO jOpmxmN7iA1F/fr0aWLxU7cAkrOh4W9iJfndeWsrbyA8YF9ubuREB7s+1la4xQ1N UIatGY0hmeCvABBKjnQZ1N61pqjl8x8Yy+qXfhuNDoR1mWR+cJ0=
    =yDqq
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    *
  • From Kentaro HAYASHI@21:1/5 to All on Fri Dec 27 13:40:01 2024
    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