[E-devel] use of ecore_time_get()

2009-02-20 Thread Vincent Torri

Hey,

the doc of ecore_time_get() says that it returns the number of second (as 
a double) from a specific date (because of gettimeofday()).

On Windows, to simulate gettimeofday(), I have to do a lot of 
computations, with a precision of 1E-3.

I can use another option, to get a higher precision (1E-6 or 1E-9), with a 
lot less computations, but without returning the number of seconds since 
1st january 1970.

My question is: is ecore_time_get() used for something else that measuring 
the time between 2 moments ? If no, I think that I can use those high 
resolution timers on Windows.

thank you

Vincent

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] use of ecore_time_get()

2009-02-20 Thread Vincent Torri


On Fri, 20 Feb 2009, Gustavo Sverzut Barbieri wrote:

>> My question is: is ecore_time_get() used for something else that measuring
>> the time between 2 moments ? If no, I think that I can use those high
>> resolution timers on Windows.
>
> Sometimes I use it to get real time, to print or insert in db, easy to
> change if required, but I wonder: is your time in seconds, or what?
> Isn't it easy to apply an offset and scale to get the number of
> seconds, at least approximately?

then it will be exatly the same computations than the current code, with 
just a higher precision. The problem is more the computations, which are a 
bit heavy to get the same value than gettimeofday().

Vincent

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] use of ecore_time_get()

2009-02-20 Thread Gustavo Sverzut Barbieri
On Fri, Feb 20, 2009 at 8:09 AM, Vincent Torri  wrote:
>
> Hey,
>
> the doc of ecore_time_get() says that it returns the number of second (as
> a double) from a specific date (because of gettimeofday()).
>
> On Windows, to simulate gettimeofday(), I have to do a lot of
> computations, with a precision of 1E-3.
>
> I can use another option, to get a higher precision (1E-6 or 1E-9), with a
> lot less computations, but without returning the number of seconds since
> 1st january 1970.
>
> My question is: is ecore_time_get() used for something else that measuring
> the time between 2 moments ? If no, I think that I can use those high
> resolution timers on Windows.

Sometimes I use it to get real time, to print or insert in db, easy to
change if required, but I wonder: is your time in seconds, or what?
Isn't it easy to apply an offset and scale to get the number of
seconds, at least approximately?

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] use of ecore_time_get()

2009-02-20 Thread Vincent Torri


On Fri, 20 Feb 2009, Gustavo Sverzut Barbieri wrote:

> On Fri, Feb 20, 2009 at 11:04 AM, Vincent Torri  wrote:
>>
>>
>> On Fri, 20 Feb 2009, Gustavo Sverzut Barbieri wrote:
>>
 My question is: is ecore_time_get() used for something else that
 measuring
 the time between 2 moments ? If no, I think that I can use those high
 resolution timers on Windows.
>>>
>>> Sometimes I use it to get real time, to print or insert in db, easy to
>>> change if required, but I wonder: is your time in seconds, or what?
>>> Isn't it easy to apply an offset and scale to get the number of
>>> seconds, at least approximately?
>>
>> then it will be exatly the same computations than the current code, with
>> just a higher precision. The problem is more the computations, which are a
>> bit heavy to get the same value than gettimeofday().
>
> Well, is it that heavy? I mean, the real code is used just few times
> per loop, if one uses ecore_loop_time_get() it's just one, so should
> not impact at all. But I'd say we can use a compile-time switch and
> let some embedded users choose the fast or the precise way.

well, in evil, i compute the # of seconds since 1st january 1970, then i 
tranformat that to get something similar to gettimeofday, then 
ecore_time_get() re-tranform again what i got to obtain the number of 
seconds. That's why i say "heavy".

I wanted to avoid to add windows code, but maybe i should actually add it 
in ecore, t avoid extra computations

Vincent

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] use of ecore_time_get()

2009-02-20 Thread Gustavo Sverzut Barbieri
On Fri, Feb 20, 2009 at 11:04 AM, Vincent Torri  wrote:
>
>
> On Fri, 20 Feb 2009, Gustavo Sverzut Barbieri wrote:
>
>>> My question is: is ecore_time_get() used for something else that
>>> measuring
>>> the time between 2 moments ? If no, I think that I can use those high
>>> resolution timers on Windows.
>>
>> Sometimes I use it to get real time, to print or insert in db, easy to
>> change if required, but I wonder: is your time in seconds, or what?
>> Isn't it easy to apply an offset and scale to get the number of
>> seconds, at least approximately?
>
> then it will be exatly the same computations than the current code, with
> just a higher precision. The problem is more the computations, which are a
> bit heavy to get the same value than gettimeofday().

Well, is it that heavy? I mean, the real code is used just few times
per loop, if one uses ecore_loop_time_get() it's just one, so should
not impact at all. But I'd say we can use a compile-time switch and
let some embedded users choose the fast or the precise way.

Regards,

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: barbi...@gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [PATCH] Eterm utf8 hack.

2009-02-20 Thread Kim Woelders
I refuse to surrender to SFs attachment stripping just yet...
diff --git a/src/command.h b/src/command.h
index 4b40713..f7d91e3 100644
--- a/src/command.h
+++ b/src/command.h
@@ -269,7 +269,7 @@ if (test) PrivateModes |= (bit); else PrivateModes &= ~(bit);} while (0)
 #define CHARS_READ()  (cmdbuf_ptr < cmdbuf_endp)
 #define CHARS_BUFFERED()  (count != CMD_BUF_SIZE)
 #define RETURN_CHAR() do { \
-char c = *cmdbuf_ptr++; \
+unsigned char c = *cmdbuf_ptr++; \
 refreshed = 0; \
 if (c < 32) D_VT(("RETURN_CHAR():  \'%s\' (%d 0x%02x %03o)\n", get_ctrl_char_name(c), c, c, c)); \
 else D_VT(("RETURN_CHAR():  \'%c\' (%d 0x%02x %03o)\n", c, c, c, c)); \
diff --git a/src/screen.c b/src/screen.c
index 605f5cf..2835876 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -29,6 +29,7 @@ static const char cvs_ident[] = "$Id: screen.c 34573 2008-05-14 22:26:36Z mej $"
 #ifdef HAVE_X11_XMU_ATOMS_H
 # include 
 #endif
+#include 
 
 #include "buttons.h"
 #include "command.h"
@@ -112,9 +113,10 @@ blank_line(text_t *et, rend_t *er, int width, rend_t efs)
 register unsigned int i = width;
 rend_t *r = er, fs = efs;
 
-MEMSET(et, ' ', i);
-for (; i--;)
+for (; i--;) {
+*et++ = ' ';
 *r++ = fs;
+}
 }
 
 /* Create a new row in the screen buffer and initialize it. */
@@ -124,15 +126,18 @@ blank_screen_mem(text_t **tp, rend_t **rp, int row, rend_t efs)
 {
 register unsigned int i = TERM_WINDOW_GET_REPORTED_COLS();
 rend_t *r, fs = efs;
+text_t *et;
 
 if (tp[row] == NULL) {
 tp[row] = MALLOC(sizeof(text_t) * (TERM_WINDOW_GET_REPORTED_COLS() + 1));
 rp[row] = MALLOC(sizeof(rend_t) * TERM_WINDOW_GET_REPORTED_COLS());
 }
-MEMSET(tp[row], ' ', i);
 tp[row][i] = 0;
-for (r = rp[row]; i--;)
+et = tp[row];
+for (r = rp[row]; i--;) {
+*et++ = ' ';
 *r++ = fs;
+}
 }
 
 void
@@ -690,6 +695,39 @@ scroll_text(int row1, int row2, int count, int spec)
 return count;
 }
 
+#undef FIXME_BLOCK
+#define FIXME_BLOCK 1
+
+#define UTF8_DEBUG 0
+
+static text_t *
+mb2text(const char *str, int *len)
+{
+static iconv_t ih = (iconv_t)-1;
+text_t *tstr;
+char *pi, *po;
+int   olen, maxolen;
+
+maxolen = *len * sizeof(text_t);
+tstr = MALLOC(maxolen);
+pi = (char*)str;
+po = (char*)tstr;
+if (ih == (iconv_t)-1)
+ih = iconv_open("UCS-2", "UTF-8");
+olen = maxolen;
+iconv(ih, &pi, len, &po, &olen);
+olen = (maxolen - olen) / 2;
+#if UTF8_DEBUG
+int i;
+printf("TO UCS2:");
+for (i = 0; i < olen; i++)
+   printf(" %04x", tstr[i]);
+printf(" UCS2 len=%d\n", olen);
+#endif
+*len = olen;
+return tstr;
+}
+
 /*
  * Add text given in  of length  to screen struct
  */
@@ -697,12 +735,12 @@ void
 scr_add_lines(const unsigned char *str, int nlines, int len)
 {
 /*charc; */
-register char c;
+register text_t c;
 
 /*int i, j, row, last_col; */
 int last_col;
 register int i, j, row;
-text_t *stp;
+text_t *stp, *tstr;
 rend_t *srp;
 row_col_t beg, end;
 
@@ -745,8 +783,11 @@ scr_add_lines(const unsigned char *str, int nlines, int len)
 chstat = WBYTE;
 #endif
 
+/* Convert incoming (mb) string to UCS-2 */
+tstr = mb2text(str, &len);
+
 for (i = 0; i < len;) {
-c = str[i++];
+c = tstr[i++];
 #ifdef MULTI_CHARSET
 if ((encoding_method != LATIN1) && (chstat == WBYTE)) {
 rstyle |= RS_multiMask; /* multibyte 2nd byte */
@@ -829,6 +870,9 @@ scr_add_lines(const unsigned char *str, int nlines, int len)
 screen.flags &= ~Screen_WrapNext;
 }
 }
+
+FREE(tstr);
+
 LOWER_BOUND(stp[last_col], screen.col);
 if (screen.col == 0) {
 end.col = last_col - 1;
@@ -1629,6 +1673,50 @@ scr_multi2(void)
 }
 #endif /* MULTI_CHARSET */
 
+static int
+scr_draw_string(Display *dpy, Drawable draw, GC gc, int x, int y, text_t *str, int len)
+{
+unsigned short buf[2048];
+int i;
+
+if (len > 2048)
+len = 2048;
+#if UTF8_DEBUG
+for (i = 0; i < len; i++)
+{
+   buf[i] = (str[i] >> 8) | (str[i] << 8);
+   printf(" %04x", buf[i]);
+}
+printf("\n");
+#else
+for (i = 0; i < len; i++)
+   buf[i] = (str[i] >> 8) | (str[i] << 8);
+#endif
+XDrawString16(dpy, draw, gc, x, y, (XChar2b*)buf, len);
+}
+
+static int
+scr_draw_image_string(Display *dpy, Drawable draw, GC gc, int x, int y, text_t *str, int len)
+{
+unsigned short buf[2048];
+int i;
+
+if (len > 2048)
+len = 2048;
+#if UTF8_DEBUG
+for (i = 0; i < len; i++)
+{
+   buf[i] = (str[i] >> 8) | (str[i] << 8);
+   printf(" %04x", buf[i]);
+}
+printf("\n");
+#else
+for (i = 0; i < len; i++)
+   buf[i] = (str[i] >> 8) | (str[i] << 8);
+#endif
+

Re: [E-devel] Submit this EWL bug in tracker?

2009-02-20 Thread Peter Wehrfritz
Terseus schrieb:
> Hi E-developers!!
>
> First of all, sorry for my possible-poor english, I write it very few.
>
> I have found a bug (at least I think it's a bug) in the EWL libraries, but
> don't know if I must submit it, let me explain...
>
> I'm developing a text-editor using EWL, the app have a tabbed bar (an
> Ewl_Notebook widget) and I create and destroy pages without problem, except
> in one special situation: when I destroy the last page of the tabbar and
> create another one, I receive the next EWL messages:
>
> * Ewl Developer Warning * :
>   
>>  To find where this is occurring set a breakpoint
>>  for the function ewl_print_warning.
>> This program is calling:
>>
>> ewl_attach_get();
>>
>> With the paramter:
>>
>> w
>>
>> as the wrong type. (NULL) instead of (widget).
>> Please fix your program.
>>
>> * Ewl Developer Warning * :
>>  To find where this is occurring set a breakpoint
>>  for the function ewl_print_warning.
>> This program is calling:
>>
>> ewl_widget_hide();
>>
>> With the paramter:
>>
>> w
>>
>> as the wrong type. (NULL) instead of (widget).
>> Please fix your program.
>>
>> 
>
> I think that EWL doesn't handle very well the void tabbars, but I have no
> problem with it... except when I destroy the last page and create another
> one exactly three times, that when I receive a "Segmentation fault" signal;
> this don't happen if I don't destroy the last page, no matter how much pages
> create and destroy, nor the sort of the pages.
>
> In addition, as you can imagine, I don't have calls to the functions
> ewl_attach_get or ewl_widget_hide in my code.
>
> With a few of gdb I found that the SF signal is raised in the function
> "ewl_widget_type_is" in the file "ewl_widget.c".
> In this function, the parameter "widget" is valid, but not his properties
> "inheritance" and "theme_path", I think that the signal is raised when, in
> the loop, access to "widget->inheritance" (but it's only a supposition).
>
> I don't post it in the tracker because I don't have the latest SVN build,
> that is because I use Enlightenment as my primary (and unique) window
> manager in this PC and now I have it with an almost-stable build (I build it
> from SVN), also I have done some bad builds'n'rollbacks, so I don't have the
> source code of my build (a stupid error, I know...) and don't know how in
> the hell provide you the exactly version of my build; so, I don't know if
> the bug is still present in the actual SVN and don't want full with garbage
> the bug tracker.
>   

It's not such important that you have an uptodate version, as long as we 
know it. There have been some (minor) changes to the notebook, recently, 
but I don't think that they changed/fixed what you are observing. So 
don't hesitate to put into the tracker. Please note, that EWL is still 
using bugzilla (bugs.enlightenment.org).

> If anyone can test this Ewl_Notebook bug with an updated build of EWL would
> be great; if want my code for creation and destroy pages say it to me and
> will send you.
> Or if anyone can say me how can I get the exactly version of my build and if
> I must post this in the tracker I'd be grateful.
>   

The best  would be a small test case to reproduce the bug, in most cases 
this shouldn't be too hard to write and is for you easier, then for us 
to figure out what you are doing in detail.

> Sorry for my noob behavior, but this will be my first bug submited in a free
> software tracker, and don't want post invalid bugs, which I think must be
> very annoying for the developers.

I prefer to have some "invalid" bug reports, then having some unreported 
"real" bugs. And even if it is you using ewl wrongly, we can maybe give 
you some advice to fix it and perhaps improve the documentation, 
although your description sounds more like an actual ewl bug.

Thanks for the report.

Peter

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Eterm and utf8

2009-02-20 Thread Kim Woelders
Sorry about that.

- It should be possible to send patch attachments to this list.
- I'm not the biggest fan of t...@$! around here.
- It seems I got the patch sneaked through now.

/Kim


On Fri, 20 Feb 2009 04:21:04 +0100, Toma  wrote:

> Patch was not included in the email. Might be best to create a bug on
> trac.enlightenment.org/e/ and attach the patch. There may already be a
> bug open for UTF8 support...
>
> -Toma.
>
>
> 2009/2/20 Kim Woelders :
>> Hello,
>>
>> It is annoying that Eterm doesn't handle utf8. Here is a half-baked  
>> patch
>> that might inspire somebody (Michael? :) ) to do it properly.
>>
>> Beware! This patch breaks things in non-utf8 locales, probably doesn't  
>> work
>> on big-endian platforms, and is not suited for anything except playing
>> around.
>>
>> That said, things seem to work fairly well with e.g. LANG=en_US.UTF-8  
>> and
>> selecting a "good" font, e.g.
>> Eterm -F  
>> -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1
>>
>> With -misc-fixed-medium-r-normal-ja-13-120-75-75-c-120-iso10646-1 it  
>> even
>> looks like Japanese and Korean is rendered correctly but there is some
>> weirdness with column stepping (every second column is skipped).
>>
>> /Kim
>> --
>> Open Source Business Conference (OSBC), March 24-25, 2009, San  
>> Francisco, CA
>> -OSBC tackles the biggest issue in open source: Open Sourcing the  
>> Enterprise
>> -Strategies to boost innovation and cut costs with open source  
>> participation
>> -Receive a $600 discount off the registration fee with the source code:  
>> SFAD
>> http://p.sf.net/sfu/XcvMzF8H
>> ___
>> enlightenment-devel mailing list
>> enlightenment-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>>
>
> --
> Open Source Business Conference (OSBC), March 24-25, 2009, San  
> Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the  
> Enterprise
> -Strategies to boost innovation and cut costs with open source  
> participation
> -Receive a $600 discount off the registration fee with the source code:  
> SFAD
> http://p.sf.net/sfu/XcvMzF8H
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Eterm and utf8

2009-02-20 Thread Peter Wehrfritz
Kim Woelders schrieb:
> Hello,
>
> It is annoying that Eterm doesn't handle utf8. Here is a half-baked 
> patch that might inspire somebody (Michael? :) ) to do it properly.

Or maybe one gsoc student :).
>
> Beware! This patch breaks things in non-utf8 locales, probably doesn't 
> work on big-endian platforms, and is not suited for anything except 
> playing around.
>
> That said, things seem to work fairly well with e.g. LANG=en_US.UTF-8 
> and selecting a "good" font, e.g.
> Eterm -F -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1
>
> With -misc-fixed-medium-r-normal-ja-13-120-75-75-c-120-iso10646-1 it 
> even looks like Japanese and Korean is rendered correctly but there is 
> some weirdness with column stepping (every second column is skipped).

I've seen in your patch that you are converting the text to ucs-2. which 
is, as you probably know, only a subset of unicode 4.0 and hence doesn't 
cover all UTF-8 supported characters. I guess that most (probably all) 
Unicode character beyond the scope of ucs-2 aren't used widely. I doubt 
that someone uses "Ancient Greek Musical Notation"-characters in a 
terminal application, but wouldn't it be better to support the whole 
UTF-8 character set, even if it is only for the sake of completeness?

Peter

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Eterm and utf8

2009-02-20 Thread Kim Woelders
On Fri, 20 Feb 2009 20:09:30 +0100, Peter Wehrfritz  
wrote:

> Kim Woelders schrieb:
>> Hello,
>>
>> It is annoying that Eterm doesn't handle utf8. Here is a half-baked  
>> patch that might inspire somebody (Michael? :) ) to do it properly.
>
> Or maybe one gsoc student :).
>>
>> Beware! This patch breaks things in non-utf8 locales, probably doesn't  
>> work on big-endian platforms, and is not suited for anything except  
>> playing around.
>>
>> That said, things seem to work fairly well with e.g. LANG=en_US.UTF-8  
>> and selecting a "good" font, e.g.
>> Eterm -F  
>> -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1
>>
>> With -misc-fixed-medium-r-normal-ja-13-120-75-75-c-120-iso10646-1 it  
>> even looks like Japanese and Korean is rendered correctly but there is  
>> some weirdness with column stepping (every second column is skipped).
>
> I've seen in your patch that you are converting the text to ucs-2. which  
> is, as you probably know, only a subset of unicode 4.0 and hence doesn't  
> cover all UTF-8 supported characters. I guess that most (probably all)  
> Unicode character beyond the scope of ucs-2 aren't used widely. I doubt  
> that someone uses "Ancient Greek Musical Notation"-characters in a  
> terminal application, but wouldn't it be better to support the whole  
> UTF-8 character set, even if it is only for the sake of completeness?
>
Yes. UCS-2 is used as internal encoding in this patch. It is what I found all 
in all seemed to give best results.
It might be considered to use UCS-2BE internally to avoid some byte swapping, 
but I got in trouble with that somewhere.

I have a similar patch where the internal encoding is wchar_t and 
mbstowcs/XwcDraw[Image]String/XFontSet are used.
I found it very hard if not impossible to select a proper font set. Either I'm 
stupid or that just doesn't work properly.

I'm fairly convinced that using UCS2 is fine for all practical purposes and I 
think that implementing utf8 support at all is more important than going for 
completeness and support for ancient whatnot :)

It could also be considered to use Xft, but again, I'm having trouble selecting 
the font I want in stead of some silly antialised one. However, there are 
reasons to try and get this right (the old X11 font system kind of being on the 
road to deprecation).

/Kim

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Eterm and utf8

2009-02-20 Thread Peter Wehrfritz
Kim Woelders schrieb:
>
> Yes. UCS-2 is used as internal encoding in this patch. It is what I 
> found all in all seemed to give best results.
> It might be considered to use UCS-2BE internally to avoid some byte 
> swapping, but I got in trouble with that somewhere.
>
> I have a similar patch where the internal encoding is wchar_t and 
> mbstowcs/XwcDraw[Image]String/XFontSet are used.
> I found it very hard if not impossible to select a proper font set. 
> Either I'm stupid or that just doesn't work properly.

I hoped that maybe Xmb* or Xutf8* (maybe not very portable) functions 
could work.
>
> I'm fairly convinced that using UCS2 is fine for all practical 
> purposes and I think that implementing utf8 support at all is more 
> important than going for completeness and support for ancient whatnot :)

That's true :).
>
> It could also be considered to use Xft, but again, I'm having trouble 
> selecting the font I want in stead of some silly antialised one. 
> However, there are reasons to try and get this right (the old X11 font 
> system kind of being on the road to deprecation).
>
> /Kim
>

Sorry my ignorance, I haven't imagined that it could be such 
complicated. And of course if you have to choose between "impossible" 
and "works for everyone", you should take the latter. :)

Peter

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel