Re: [dev] [st] double-width usage

2013-04-23 Thread random832
On Tue, Apr 23, 2013, at 11:01, Silvan Jegen wrote:
> I saw, compiled and tested it but when using mutt only half of the
> (Japanese Kanji) characters would be drawn (so presumably only one
> character cell of a two-cell double character). If I wasn't at a
> conference I would deliver some screenshots but as things stand, I can
> only get back to you after I am back home in a few days.

Don't worry about screenshots, I know what it looks like. That is the
graphical glitch I was referring to (along with being left-aligned).

I'm considering possible ways to fix it - but all I can think of is to
rewrite the entire drawregion function to draw all backgrounds first and
then all characters.



Re: [dev] [st] double-width usage

2013-04-23 Thread Silvan Jegen
On Tue, Apr 23, 2013 at 1:42 PM, Random832  wrote:
> Did you see the st.c I posted a few days ago? The logic for double width is
> mostly complete in it - I just have to fix a few graphical glitches, and
> there are a couple of corner cases (mainly regarding erasing a double width
> character by overwriting with a single width when background colors are
> involved) that different terminals don't handle the same way, that it's not
> clear which terminal we should follow or if it's even important to emulate
> one particular behavior.

I saw, compiled and tested it but when using mutt only half of the
(Japanese Kanji) characters would be drawn (so presumably only one
character cell of a two-cell double character). If I wasn't at a
conference I would deliver some screenshots but as things stand, I can
only get back to you after I am back home in a few days.



Re: [dev] [st] double-width usage

2013-04-23 Thread Random832

On 04/23/2013 03:07 AM, Christoph Lohmann wrote:

Hello comrades,

Here’s some RFC for people using double‐width characters in terminals in
their daily life.

Which applications do you use that handle double-width as you expect them?

Do these applications use the double-width for the layout?

Any Chinese or Japanese user?

If double-width characters would be drawn to fit the standard cell size of the
terminal (drawing them in half the font size) would this suffice your need?

This question implies that it is possible to simply increase the
average fontsize so the complex glyphs look good. Would this suffice
your need?


Naming the applications would be important so I can test st to their
compatibility.


Sincerely,

Christoph Lohmann


Did you see the st.c I posted a few days ago? The logic for double width 
is mostly complete in it - I just have to fix a few graphical glitches, 
and there are a couple of corner cases (mainly regarding erasing a 
double width character by overwriting with a single width when 
background colors are involved) that different terminals don't handle 
the same way, that it's not clear which terminal we should follow or if 
it's even important to emulate one particular behavior.




Re: [dev] [st] double-width usage

2013-04-23 Thread Silvan Jegen
On Tue, Apr 23, 2013 at 09:07:14AM +0200, Christoph Lohmann wrote:
> Which applications do you use that handle double-width as you expect them?

I use mutt and vim which handle double-width characters the way I expect
them to (using urxvt or lxterm).


>   Do these applications use the double-width for the layout?

Yes, I think they do.


>   Any Chinese or Japanese user?

I use Japanese regularly (Japanese Studies major; I am not Japanese
though). Writing Japanese in Vim is not as easy as I would like it to
be so I usually go for a non-modal editor for that use case.


> If double-width characters would be drawn to fit the standard cell size of the
> terminal (drawing them in half the font size) would this suffice your need?

I think the characters would be squished to an unreadable degree, but I
think I have never seen it done in practice.


>   This question implies that it is possible to simply increase the
>   average fontsize so the complex glyphs look good. Would this suffice
>   your need?

That would entail that everyone uses a certain (bigger) minimal font
size if they want to be able to read width characters, no?

Thank you for looking at this! I tried to hack wide-character support
into st myself because when that is done, I will use it as my only terminal
emulator.


Cheers,

Silvan




Re: [dev] [st] double-width usage

2013-04-23 Thread Thorsten Glaser
Christoph Lohmann dixit:

>Which applications do you use that handle double-width as you expect them?

mksh and jupp (though I don’t use st).

>   Do these applications use the double-width for the layout?

It’s possible to use Unicode characters, halfwidth or fullwidth,
to draw nice boxen in either.

>If double-width characters would be drawn to fit the standard cell size of the
>terminal (drawing them in half the font size) would this suffice your need?

Absolutely not. You need to distinguish by wcwidth() on the first
character whether a given glyph (including the combining characters
following it) fits into a halfwidth character cell or into a fullwidth
character cell, which is exactly the width of two adjacent halfwidth
character cells.

Treating fullwidth as halfwidth, or the other way around, will not work.

>Naming the applications would be important so I can test st to their
>compatibility.

Hrm, a shell and a text editor aren’t that good examples then…
and I don’t have any good mixed example textfiles at hand. Sorry.

But just this might be a PoC:

┌──┤ U+00A9 ├──┐
│  │
│  ䷀   │
│ ䷀ ䷀  │
│ ䷀  ䷀䷀ ䷀  │
│ ䷀ ䷀   ䷀  │
│ ䷀ ䷀   ䷀  │
│ ䷀  ䷀䷀ ䷀  │
│ ䷀ ䷀  │
│  ䷀   │
└──┘

I’m writing textfiles like that pretty often, and I use
the creative heaven and fullwidth space in my own font
editing tools (mksh script to convert between that and
BDF, while doing the actual editing in a text editor
and/or with ed and shell scripts).

bye,
//mirabilos
-- 
FWIW, I'm quite impressed with mksh interactively. I thought it was much
*much* more bare bones. But it turns out it beats the living hell out of
ksh93 in that respect. I'd even consider it for my daily use if I hadn't
wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh



Re: [dev] [st] double-width usage

2013-04-23 Thread Petr Šabata
On Tue, Apr 23, 2013 at 09:07:14AM +0200, Christoph Lohmann wrote:
> Hello comrades,

Hi Christoph,

> Here’s some RFC for people using double‐width characters in terminals in
> their daily life.
> 
> Which applications do you use that handle double-width as you expect them?
> 
>   Do these applications use the double-width for the layout?
> 
>   Any Chinese or Japanese user?

I use them all the time -- in irssi, vim, ncmpc, ... even mc
(in filenames).  I have no issues anywhere with xterm.

Not sure what 'use double-width for the layout' means but
mc has to deal with them somehow because the panels' layout
doesn't break...

> If double-width characters would be drawn to fit the standard cell size of the
> terminal (drawing them in half the font size) would this suffice your need?
> 
>   This question implies that it is possible to simply increase the
>   average fontsize so the complex glyphs look good. Would this suffice
>   your need?

Then the standard western character would be really huge...

I currently use an 18px bitmap font (misc-fixed), wide characters
taking two cells, and it's so-so -- they're readable and the
size of western letters is still acceptable for my taste.
I've mentioned this in a dead thread in the past [1].

I saw wide characters using just one standard cell in urxvt
long time ago and it looked terrible.

> Naming the applications would be important so I can test st to their
> compatibility.
> 
> 
> Sincerely,
> 
> Christoph Lohmann

Again, thanks for working on this.

Petr

[1] http://lists.suckless.org/dev/1210/12748.html


pgpFMbb8kBqdy.pgp
Description: PGP signature


Re: [dev] [st] double-width usage

2013-04-23 Thread Alice Ferrazzi
Hello,
I use st also for read japanese, so i think i can be in the japanese
user category.
application used:
tmux
mutt
moc music player
irssi
zathura as pdf viewer


On Tue, Apr 23, 2013 at 4:07 PM, Christoph Lohmann <2...@r-36.net> wrote:
> Hello comrades,
>
> Here’s some RFC for people using double‐width characters in terminals in
> their daily life.
>
> Which applications do you use that handle double-width as you expect them?
>
> Do these applications use the double-width for the layout?
>
> Any Chinese or Japanese user?
>
> If double-width characters would be drawn to fit the standard cell size of the
> terminal (drawing them in half the font size) would this suffice your need?
>
> This question implies that it is possible to simply increase the
> average fontsize so the complex glyphs look good. Would this suffice
> your need?

i actually don't know how it will display the character, drawing them
half in the font size... but if the character looks good why not

>
>
> Naming the applications would be important so I can test st to their
> compatibility.
>
>
> Sincerely,
>
> Christoph Lohmann
>
>



--


--
Alice Ferrazzi 



[dev] [st] double-width usage

2013-04-23 Thread Christoph Lohmann
Hello comrades,

Here’s some RFC for people using double‐width characters in terminals in
their daily life.

Which applications do you use that handle double-width as you expect them?

Do these applications use the double-width for the layout?

Any Chinese or Japanese user?

If double-width characters would be drawn to fit the standard cell size of the
terminal (drawing them in half the font size) would this suffice your need?

This question implies that it is possible to simply increase the
average fontsize so the complex glyphs look good. Would this suffice
your need?


Naming the applications would be important so I can test st to their
compatibility.


Sincerely,

Christoph Lohmann