Thank you Ezequiel,
it means that there's no way to change "automatically" DirectFB behaviour
to show fonts that came in ISO-8859-15 (Latin9) in a UTF-8 system wide ?

    I thought it enough reconfigure the system locales and change some
system variables (LANG and LC_* variables) to use these new locales, but
searching more on Ubuntu (10.10) I noticed that Ubuntu doesn't has any
mention on files "encodings.dir" (for example
/usr/share/fonts/X11/encodings/encodings.dir) to string "iso8859-15" and on
this same directory (/usr/share/fonts/X11/encodings) there's
none iso8859-15.enc.gz.
    Is this the infrastructure that provides support to encoding ?
    To provides ISO-8859-15 "automatically" to system I need provide these
corrected files (iso8859-16.enc.gz and encodings.dir ) ?

Thanks

Flávio Alberto Lopes Soares


2012/7/11 Ezequiel Garcia <elezegar...@gmail.com>

> Hi Flavio,
>
> On Wed, Jul 11, 2012 at 12:24 PM, Flávio Alberto
> <flavioalsoa...@gmail.com> wrote:
> > Hello,
> >
> > I'm trying to run dfbtest_font from DirectFB-1.4.11 with a string using
> > encoding format ISO8859-15 on Ubuntu 10.10 (UTF-8 by default),
> > to do this I change dfbtest_font.c on line 186 to this :
> >
>
> My personal solution for this problem is to translate every string I
> want to draw with DirectFB.
>
> I do this with a C++ function like this: (I snipped part of it)
>
> char* ISO8859_15_To_UTF8(const char* chrInText)
> {
>         const unsigned char* in  = (const unsigned char*)chrInText;
>         string str = "";
>
>         int i = 0;
>         while (in[i] != '\0') {
>
>                 switch (in[i]) {
>                         case 0xa1:
>                                 str += "¡";
>                                 break;
>                         case 0xbf:
>                                 str += "¿";
>                                 break;
>                         case 0xc0:
>                                 str += "À";
>                                 break;
>                         case 0xc1:
>                                 str += "Á";
>                                 break;
>                         //
>                         // Fill the rest .....
>                         case 0xfe:
>                                 str += "þ";
>                                 break;
>                         case 0xff:
>                                 str += "ÿ";
>                                 break;
>                         default:
>                                 str += in[i];
>                                 break;
>                 }
>                 i++;
>         }
>
>         // Warning: user must free this
>         return strdup(str.c_str());
> }
>
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to