Re: Unicode grapheme clusters

Поиск
Список
Период
Сортировка
От Isaac Morland
Тема Re: Unicode grapheme clusters
Дата
Msg-id CAMsGm5dfwyA3qba2MAC_t384X8uTfhwc2q8jtat1pxHTA-z3UA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Unicode grapheme clusters  (Greg Stark <stark@mit.edu>)
Список pgsql-hackers
On Tue, 24 Jan 2023 at 11:40, Greg Stark <stark@mit.edu> wrote:

At the end of the day Unicode kind of assumes a variable-width display
where the rendering is handled by something that has access to the
actual font metrics. So anything trying to line things up in columns
in a way that works with any rendering system down the line using any
font is going to be making a best guess.

Really what is needed is another Unicode attribute: how many columns of a monospaced display each character (or grapheme cluster) should take up. The standard should include a precisely defined function that can take any sequence of characters and give back its width in monospaced display character spaces. Typefaces should only qualify as monospaced if they respect this standard-defined computation.

Note that this is not actually a new thing: this was included in ASCII implicitly, with a value of 1 for every character, and a value of n for every n-character string. It has always been possible to line up values displayed on monospaced displays by adding spaces, and it is only the omission of this feature from Unicode which currently makes it impossible.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: run pgindent on a regular basis / scripted manner
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: cutting down the TODO list thread