all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Denys Nykula <vegan@libre.net.ua>
To: 64399@debbugs.gnu.org
Cc: Denys Nykula <vegan@libre.net.ua>
Subject: [bug#64399] [PATCH] installer: Restore LatGrkCyr-8x16 console font depending on language.
Date: Sat,  1 Jul 2023 16:19:14 +0300	[thread overview]
Message-ID: <34ca88bad83d40c14346f18ddbc34e8d2884f88f.1688217377.git.vegan@libre.net.ua> (raw)

Partially-Fixes: <https://issues.guix.gnu.org/64006>

* gnu/installer/services.scm (system-services->configuration): When the
LANGUAGE environment variable matches a known native console font, wrap the
%desktop-services or %base-services with modify-services, configuring
console-font-service-type to set the native console font on every tty instead
of the default console font.
---
This makes console messages, such as errors and help texts, readable (like they
were in Guix System 1.4.0) if the user chooses the Belarusian, Bulgarian,
Greek, Esperanto, Kazakh, Kyrgyz, Macedonian, Mongolian, Russian, Serbian,
Tajik or Ukrainian language at the beginning of a new installation.  For other
languages, this keeps the default font, which is Unifont-APL8x16 in the latest
development snapshots.  Thanks to Florian Pelz and Josselin Poiret for tips
about editing the installer and testing it using a virtual machine.

 gnu/installer/services.scm | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/gnu/installer/services.scm b/gnu/installer/services.scm
index d08bab47fd..fb66f2248c 100644
--- a/gnu/installer/services.scm
+++ b/gnu/installer/services.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2023 Denys Nykula <vegan@libre.net.ua>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,6 +24,7 @@
 (define-module (gnu installer services)
   #:use-module (guix records)
   #:use-module (guix read-print)
+  #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
   #:export (system-service?
             system-service-name
@@ -156,9 +158,22 @@ (define (system-services->configuration services)
   (let* ((snippets (append-map system-service-snippet services))
          (packages (append-map system-service-packages services))
          (desktop? (find desktop-system-service? services))
-         (base     (if desktop?
-                       '%desktop-services
-                       '%base-services))
+         (base-with-default-console-font (if desktop?
+					     '%desktop-services
+					     '%base-services))
+	 (native-console-font (match (getenv "LANGUAGE")
+				((or "be" "bg" "el" "eo" "kk" "ky"
+				     "mk" "mn" "ru" "sr" "tg" "uk")
+				 "LatGrkCyr-8x16.psfu.gz")
+				(_ #f)))
+	 (base (if native-console-font
+		   `(modify-services
+		     ,base-with-default-console-font
+		     (console-font-service-type
+		      config => (map (lambda (tty)
+				       (cons (car tty) ,native-console-font))
+				     config)))
+		   base-with-default-console-font))
          (service-heading (list (vertical-space 1)
                                 (comment (G_ "\
 ;; Below is the list of system services.  To search for available

base-commit: b24a05830d11e3011eee4bc5f60a41e26188cde1
-- 
2.40.1





             reply	other threads:[~2023-07-01 14:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-01 13:19 Denys Nykula [this message]
2023-07-01 17:03 ` [bug#64399] [PATCH] installer: Restore LatGrkCyr-8x16 console font depending on language pelzflorian (Florian Pelz)
2023-07-01 20:48 ` [bug#64399] [PATCH v2] " Denys Nykula
2023-07-05 19:55   ` pelzflorian (Florian Pelz)
2023-07-06  8:56     ` Josselin Poiret via Guix-patches via
2023-07-06 14:27       ` pelzflorian (Florian Pelz)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34ca88bad83d40c14346f18ddbc34e8d2884f88f.1688217377.git.vegan@libre.net.ua \
    --to=vegan@libre.net.ua \
    --cc=64399@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.