* Re: [kbd] Please support narrow no-break space (U+202F)
@ 2010-08-29 12:03 ` Alexey Gladkov
0 siblings, 1 reply; 4+ messages in thread
From: Alexey Gladkov @ 2010-08-29 12:03 UTC (permalink / raw)
To: kbd
26.08.2010 02:02, Nicolas Delvaux wrote:
> Hi,
>
> narrow no-break space chars (lets say nnbsp) are used in French before
> ";?!»" chars and after "«". It is also used in other language, for
> example for the short form of the Czech dates.
>
> Currently, when I switch to a TTY and type a nnbsp, it displays a kind
> of diamond (Ubuntu 10.04).
> (if you can't easily type a nnbsp with your keyboard layout, run
> "/usr/bin/printf '\u202Fx\n'")
>
> I had a look in kbd .uni files, and I didn't found any sign of u+202f
> So I propose to just use nnbsp as U+0020 (white space). The same was
> done for "no-break space" (U+00a0) and it works.
>
> Someone pointed to me that this behavior is consistent with the
> 'wcwidth' function of glibc:
>
> This program:
> =============================================================
> #include <locale.h>
> #include <wctype.h>
> #include <wchar.h>
> #include <stdio.h>
> int main () {
> setlocale (LC_ALL, "fr_FR.UTF-8");
> printf ("wcwidth (0x00A0) = %d\n", wcwidth (0x00A0));
> printf ("wcwidth (0x202F) = %d\n", wcwidth (0x202F));
> return 0;
> }
> =============================================================
> return
> wcwidth (0x00A0) = 1
> wcwidth (0x202F) = 1
>
>
> I don't know if adding this support is just as simple as adding "u+202f"
> at the 0x20 line of each .uni file (if so I can provide a patch if you
> want).
You suggest to replace different types of whitespace symbols with 0x20.
Have I understood you correctly?
--
Rgrds, legion
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [kbd] Please support narrow no-break space (U+202F)
@ 2010-08-29 21:37 ` Ken Moffat
0 siblings, 1 reply; 4+ messages in thread
From: Ken Moffat @ 2010-08-29 21:37 UTC (permalink / raw)
To: Linux console tools development discussion
On Sun, Aug 29, 2010 at 07:50:06PM +0200, Nicolas Delvaux wrote:
>
> Of course it would be better if nnbsp were at least "unbreakable" but,
> with the current kbd, even non-break spaces break (because they are
> mapped to 0x20). Perhaps this is by design, I don't know.
>
The console fonts run in a tty. I think the appropriate
description might be "what you ask for is what you get".
If you are looking at html in a browser, the browser makes decisions
about how to process the nbsp entity. But for plain text, you get
what the current font produces for that character. The font doesn't
add a linefeed of its own accord - long lines just appear to wrap onto
the next line of the screen.
ĸen
--
das eine Mal als Tragödie, das andere Mal als Farce
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [kbd] Please support narrow no-break space (U+202F)
@ 2010-08-29 22:52 ` Ken Moffat
0 siblings, 1 reply; 4+ messages in thread
From: Ken Moffat @ 2010-08-29 22:52 UTC (permalink / raw)
To: Linux console tools development discussion
On Mon, Aug 30, 2010 at 12:32:28AM +0200, Nicolas Delvaux wrote:
>
> Indeed, it's logical, thanks.
>
> As a side note to this "feature request", there is other Unicode spaces
> you might want to support: http://en.wikipedia.org/wiki/Space_%
> 28punctuation%29#Table_of_spaces
> I let you see, personally I just need narrow non-break spaces. ;-)
>
> Nicolas
As a side-note to the request, you can change your local psfu fonts
using psftools (from freshmeat if your distro doesn't supply it):
txt2psf to reproduce the font in a text form ('-' for blank pixels,
'#' for lit pixels),
edit it to add more characters to the space glyph - e.g.
Unicode: [00000020];[000000a0];[0000202f];
(to add U+202f to an existing U+00a0).
and then txt2psf to convert the altered file to a psfu font.
I was interested to see your request, and _surprised_ that you have
this character mapped on your keyboard. I thought people would just
type a regular space - shows how little I know.
ĸen
--
das eine Mal als Tragödie, das andere Mal als Farce
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [kbd] Please support narrow no-break space (U+202F)
@ 2010-09-08 21:53 ` Alexey Gladkov
0 siblings, 0 replies; 4+ messages in thread
From: Alexey Gladkov @ 2010-09-08 21:53 UTC (permalink / raw)
To: kbd
05.09.2010 23:39, Nicolas Delvaux wrote:
> Does it feel as a proper fix for you? If not, how can I improve it?
I added your patch and new fonts, but I need more testing it. Thanks!
http://git.altlinux.org/people/legion/packages/kbd.git?p=kbd.git;a=commitdiff;h=50f674d1775bc75f799c583b887c3329088ff620
--
Rgrds, legion
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-09-08 21:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-29 12:03 ` [kbd] Please support narrow no-break space (U+202F) Alexey Gladkov
2010-08-29 21:37 ` Ken Moffat
2010-08-29 22:52 ` Ken Moffat
2010-09-08 21:53 ` Alexey Gladkov
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