[dev] [st] xft: line drawing

2012-09-25 Thread Brandon Invergo
Line drawing seems to be broke using the latest tip of st. I've tried it
with the default config.def.h as well as using some other fonts but with
no luck. I tried changing the gfx[] array contents in config.def.h except
its use is rather opaque and I couldn't get anything to work.

Anyone else have this problem or is it just me?

-brandon




Re: [dev] [st] xft: line drawing

2012-09-25 Thread Roberto E. Vargas Caballero
 Line drawing seems to be broke using the latest tip of st. I've tried it

I also have problems with them. Using the default font I have some problems
with line drawings and attributes (for example http://www.shike2.com/st.png).

Is it the problem you have?.


Best regards,



[dev] [st] Patch fix writing io file

2012-09-25 Thread Roberto E. Vargas Caballero
Fix a bug with multi byte characters.
From a7ad8ce85ebddfacd1cab80d7b5b2189d0842d53 Mon Sep 17 00:00:00 2001
From: Roberto E. Vargas Caballero k...@shike2.com
Date: Mon, 24 Sep 2012 22:58:47 +0200
Subject: Fix bug in tputc writing to io file

If -f options is enabled then tputc() writes all the data to a file. Actual
code assumes that all the strings in 'c' parameters have always 1 byte
length, but this is not always true, because due to utf-8 encoding some
characters can have a diferent length. So it is necessary pass string length
to tputc in order it can call to write() correctly.
---
 st.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/st.c b/st.c
index 2d080e5..a0bd69f 100644
--- a/st.c
+++ b/st.c
@@ -278,7 +278,7 @@ static void tmoveto(int, int);
 static void tnew(int, int);
 static void tnewline(int);
 static void tputtab(bool);
-static void tputc(char*);
+static void tputc(char*, int);
 static void treset(void);
 static int tresize(int, int);
 static void tscrollup(int, int);
@@ -884,7 +884,7 @@ ttyread(void) {
 	while(buflen = UTF_SIZ || isfullutf8(ptr,buflen)) {
 		charsize = utf8decode(ptr, utf8c);
 		utf8encode(utf8c, s);
-		tputc(s);
+		tputc(s, charsize);
 		ptr+= charsize;
 		buflen -= charsize;
 	}
@@ -1641,11 +1641,11 @@ tputtab(bool forward) {
 }
 
 void
-tputc(char *c) {
+tputc(char *c, int len) {
 	char ascii = *c;
 
 	if(iofd != -1)
-		write(iofd, c, 1);
+		write(iofd, c, len);
 
 	if(term.esc  ESC_START) {
 		if(term.esc  ESC_CSI) {
-- 
1.7.10.4



Re: [dev] [st] xft: line drawing

2012-09-25 Thread Kurt H Maier
On Tue, Sep 25, 2012 at 05:47:07PM +0200, Brandon Invergo wrote:
 
 Anyone else have this problem or is it just me?
 

we have to find out if it's working on christophms mac or it won't get
fixed



Re: [dev] [st] xft: line drawing

2012-09-25 Thread Martti Kühne
On Tue, Sep 25, 2012 at 9:24 PM, Kurt H Maier khm-suckl...@intma.in wrote:
 On Tue, Sep 25, 2012 at 05:47:07PM +0200, Brandon Invergo wrote:

 Anyone else have this problem or is it just me?



works here. but long shot what I did to make it work.
maybe I'm just using tmux which handles line drawing just fine?
maybe I just commented out the gfx[] matching in st source?
- although, checking the source, the line char c = gfx[blah...] is
there, and it should match quite a bunch of chars.
maybe it's because with xft support, the transition between line
drawing and the corresponding wtf8 glyph just works...

sorry for not being very precise here, 0xe29480 (horizontal line)
displays fine otherwise in st without tmux... and I'm using an
extremely incomplete xft font, envy-code-r.

cheers!
mar77i



Re: [dev] [st] xft: line drawing

2012-09-25 Thread Thuban
I noticed this problem too. Lines are replaced by some strange small
squares.

Le 17:47:07 le 25 sept. 2012 , Brandon Invergo a écrit :
 Line drawing seems to be broke using the latest tip of st. I've tried it
 with the default config.def.h as well as using some other fonts but with
 no luck. I tried changing the gfx[] array contents in config.def.h except
 its use is rather opaque and I couldn't get anything to work.
 
 Anyone else have this problem or is it just me?
 
 -brandon
 
 

-- 
 ,--.   Xavier Cartron   ,   /(
: /` )  M2 MEFPCo **}=\\,\(,,  
| `-'   Debian user0--(___(_\\
 \_ jabber : thu...@jabber.fr  / ,)   ,/ ``==



Re: [dev] [st] xft: line drawing

2012-09-25 Thread Christoph Lohmann
Greetings comrades.

On Wed, 26 Sep 2012 07:18:49 +0200 Thuban thu...@singularity.fr wrote:
 I noticed this problem too. Lines are replaced by some strange small
 squares.

A  »strange  small  square« means in xft that your font is missing some‐
thing. The line drawing issue is a bit more complex.  The  gfx  code  is
from corefonts and not supposed to work with xft.

For  those  alternative charsets remapping some ranges of the symbols is
required, which could be easily done using UTF‐8 characters.

This alternative charset mode is really obscure.


Sincerely,

Christoph Lohmann