Linux console tools development discussion
 help / color / mirror / Atom feed
* [kbd] unicode_start should not call setfont
@ 2008-05-31  7:31 Michael Schutte
  2008-05-31 23:54 ` Alexey Gladkov
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Schutte @ 2008-05-31  7:31 UTC (permalink / raw)
  To: kbd

[-- Attachment #1: Type: text/plain, Size: 772 bytes --]

Hi,

I think that unicode_start should not mess with the user’s console font.
It should only put the console into Unicode mode and be done with it.
The problem with the current approach is that the default Unicode fonts
considered by the script are often not what the user wants to see.
Every font should be fine to display enough characters to be readable,
anyway, and users who need a larger subset of Unicode characters can run
setfont manually.  It would also make sense because unicode_stop never
changes font.

The obvious counter-argument is backwards compatibility, but then, most
users will not call unicode_start themselves but leave it to their
distribution’s init scripts.  What do you think?

-- 
Michael Schutte <m.schutte.jr@gmail.com>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 481 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [kbd] unicode_start should not call setfont
  2008-05-31  7:31 [kbd] unicode_start should not call setfont Michael Schutte
@ 2008-05-31 23:54 ` Alexey Gladkov
  2008-06-01  7:55   ` Michael Schutte
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey Gladkov @ 2008-05-31 23:54 UTC (permalink / raw)
  To: Linux console tools development discussion

Michael Schutte wrote:
> Hi,
> 
> I think that unicode_start should not mess with the user’s console font.
> It should only put the console into Unicode mode and be done with it.
> The problem with the current approach is that the default Unicode fonts
> considered by the script are often not what the user wants to see.
> Every font should be fine to display enough characters to be readable,
> anyway, and users who need a larger subset of Unicode characters can run
> setfont manually.  It would also make sense because unicode_stop never
> changes font.
> 
> The obvious counter-argument is backwards compatibility, but then, most
> users will not call unicode_start themselves but leave it to their
> distribution’s init scripts.  What do you think?

We could do another thing:

diff --git a/src/unicode_start b/src/unicode_start
index 82ef457..63c9967 100755
--- a/src/unicode_start
+++ b/src/unicode_start
@@ -83,7 +83,6 @@ case "$#" in
                 setfont "$1"
                 ;;
         0)
-               setfont "$DEFAULT_UNICODE_FONT"
                 ;;
         *)
                 echo "usage: unicode_start [font [unicode map]]"
---

Most distributions load own fonts after executing unicode_start. I 
think we can remove the setting of default font.

Without any arguments unicode_start will only set unicode mode and 
will not set font.

How about that?

-- 
Rgrds, legion



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [kbd] unicode_start should not call setfont
  2008-05-31 23:54 ` Alexey Gladkov
@ 2008-06-01  7:55   ` Michael Schutte
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Schutte @ 2008-06-01  7:55 UTC (permalink / raw)
  To: kbd

[-- Attachment #1: Type: text/plain, Size: 2318 bytes --]

On Sun, Jun 01, 2008 at 03:54:21AM +0400, Alexey Gladkov wrote:
> We could do another thing:
>
> diff --git a/src/unicode_start b/src/unicode_start
> index 82ef457..63c9967 100755
> --- a/src/unicode_start
> +++ b/src/unicode_start
> @@ -83,7 +83,6 @@ case "$#" in
>                 setfont "$1"
>                 ;;
>         0)
> -               setfont "$DEFAULT_UNICODE_FONT"
>                 ;;
>         *)
>                 echo "usage: unicode_start [font [unicode map]]"
> ---
>
> Most distributions load own fonts after executing unicode_start. I think we 
> can remove the setting of default font.
>
> Without any arguments unicode_start will only set unicode mode and will not 
> set font.
>
> How about that?

This is exactly what I had in mind, I just failed to express myself :-)

Just an addition to your patch, before it gets forgotten:

diff --git a/man/man1/unicode_start.1 b/man/man1/unicode_start.1
index 7c2b939..b76ccb3 100644
--- a/man/man1/unicode_start.1
+++ b/man/man1/unicode_start.1
@@ -26,7 +26,7 @@ The parameter
 .I font
 is a font that is loaded. It should have a built-in Unicode map,
 or, if it hasn't, such a map can be given explicitly as second parameter.
-When no font was specified, some default font is loaded.
+When no font was specified, the current font is kept.
 .SH NOTE
 Unicode mode is a parameter with a value per virtual console.
 However, usually the font and keymap is common to all consoles.
diff --git a/src/unicode_start b/src/unicode_start
index cfa19f8..7351fe0 100755
--- a/src/unicode_start
+++ b/src/unicode_start
@@ -85,18 +85,6 @@ stty iutf8
 # have a Unicode map attached, or explicitly specified, e.g.,
 # by giving `def.uni' as a second argument.
 
-# Also drdos8x16 is a good candidate.
-for DEFAULT_UNICODE_FONT in \
-       /usr/share/consolefonts/Uni1-VGA16.psf* \
-       /usr/share/consolefonts/LatArCyrHeb-16.psf* \
-       /usr/share/consolefonts/default*.psf* \
-       /usr/share/consolefonts/*.psf*
-do
-       if [ -f "$DEFAULT_UNICODE_FONT" ]; then
-               break
-       fi
-done
-
 case "$#" in
        2)
                setfont "$1" -u "$2"
---

I’ll apply this for the next Debian revision of kbd.

Regards,
-- 
Michael Schutte <m.schutte.jr@gmail.com>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 481 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-06-01  7:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-31  7:31 [kbd] unicode_start should not call setfont Michael Schutte
2008-05-31 23:54 ` Alexey Gladkov
2008-06-01  7:55   ` Michael Schutte

Linux console tools development discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/kbd/0 kbd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kbd kbd/ http://lore.altlinux.org/kbd \
		kbd@lists.altlinux.org kbd@lists.altlinux.ru kbd@lists.altlinux.com
	public-inbox-index kbd

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.kbd


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git