Skip to contentSkip to conversation

Please support narrow no-break space (U+202F)

kbd Alexey Gladkov 2 participants 4 messages Aug 29, 2010 – Sep 8, 2010 5 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 1282773735.2037.32.camel@nicolas-eisti

#1 lore raw
Quoted 36 lines · Nicolas Delvaux

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

Quoted 3 lines

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?

Signature · 1 line
Rgrds, legion

A message that is not in the archive (sent off-list or not yet received): 1283104206.2052.42.camel@nicolas-home

#3 lore raw
Quoted 5 lines · Nicolas Delvaux

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

Signature · 1 line
das eine Mal als Tragödie, das andere Mal als Farce

A message that is not in the archive (sent off-list or not yet received): 1283121148.6204.15.camel@nicolas-home

#5 lore raw
Quoted 9 lines · Nicolas Delvaux

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

Signature · 1 line
das eine Mal als Tragödie, das andere Mal als Farce

A message that is not in the archive (sent off-list or not yet received): 1283471403.10528.22.camel@nicolas-home

A message that is not in the archive (sent off-list or not yet received): 1283715553.2881.40.camel@nicolas-home