Hello all,

I've been trying in vain to set a font other than the default for a
label.

When I do it like this:

   dfb_res = lite_new_label( LITE_BOX( lwFrame), &rect,
liteNoLabelTheme, 20, &label_title);
   lite_set_label_font( &label_title, "FontName", LITE_FONT_PLAIN, 18,
0);

It seems to have no effect - default font is still used.

I think the font should load properly like that because this works fine
to set the font for a TextButton:
          lite_get_font("FontName", LITE_FONT_PLAIN, 18, 0, &textFont);
          lite_new_text_button_theme( DATADIR "/textbuttonbgnd.png",
&textButtonTheme);
          textButtonTheme->font = textFont;


I have tried to build a new LiteLabelTheme to assign instead of
liteNoLabelTheme:

   LiteLabelTheme* textLabelTheme;

    textLabelTheme = D_CALLOC(1, sizeof(LiteLabelTheme));
    lite_get_font("FontName", LITE_FONT_PLAIN, 18, 0, &textFont);
    textLabelTheme->font = textFont;
    dfb_res = lite_new_label( LITE_BOX( lwFrame), &rect, textLabelTheme,
20, &label_title);

But that has no effect either - still default font.

Can anyone tell me how to do it?


Tash Robinson


-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of [email protected]
Sent: Friday, December 19, 2008 6:00 AM
To: [email protected]
Subject: LiTE Digest, Vol 4, Issue 5

Send LiTE mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.directfb.org/cgi-bin/mailman/listinfo/lite
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific than
"Re: Contents of LiTE digest..."


Today's Topics:

   1. Re: [Lite] internationalization strategy (Niels Roest)
   2. Re: [Lite] internationalization strategy (Jan Elmenthaler)
      (askhao)


----------------------------------------------------------------------

Message: 1
Date: Thu, 18 Dec 2008 15:26:03 +0100
From: Niels Roest <[email protected]>
Subject: Re: [LiTE] [Lite] internationalization strategy
To: Jan Elmenthaler <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi Jan.

first of all, you need to have a Chinese font installed. LiTE uses
gulim.ttf by default, which it looks for in
/opt/local/share/fonts/truetype/ on my machine. I don't have it
installed so it's a little bit guessing for me from here. Unfortunately,
this only works in conjunction with the hantextline widget.

I would propose to, as a first test, simply copy a font with Chinese
characters over the default font which is called vera.ttf. Now, you
should be able to use and see UTF-8 text.

If your text box is not large enough, LiTE will perform truncating, this
may lead to funny effects with UTF-8, so have a look how it works in
your case.

Greets
Niels

Jan Elmenthaler wrote:
> Hi there!
>
> I just tried out to display some chinese characters on a LiTE 
> textbutton but only the square space holder is shown.
>
> Loading either german, english or chinese descriptions from an ini 
> file works fine. I can see the chinese characters both in my log file 
> and in the telnet terminal connected with our powerPC but not on 
> screen :(
>
> Can anybody tell me if it is working in general and maybe offer me
some hints?
>
> Thanks in advance,
> Jan
> _______________________________________________
> LiTE mailing list
> [email protected]
> http://mail.directfb.org/cgi-bin/mailman/listinfo/lite
>
>   


-- 

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------" 



------------------------------

Message: 2
Date: Fri, 19 Dec 2008 08:47:47 +0800
From: "askhao" <[email protected]>
Subject: Re: [LiTE] [Lite] internationalization strategy (Jan
        Elmenthaler)
To: "lite" <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="gb2312"

Hi Jan:

    i recently do the same work on the iptv. Maybe could give you some
advice.
    1?ttf liabrary : simkai.ttf or msyh.ttf or other characters liabrary
must have, the code format is gb2312
    2?map : do a map on the unicode to gb2312, my implemation is used of
a map list , i think you can find on the net
    3?load : in the lite code, load the ttf liabrary , notice the load
path and the name

    that all





askhao
2008-12-19



???? [email protected]
????? 2008-12-18 19:00:09
???? [email protected]
??? 
??? LiTE Digest, Vol 4, Issue 4

Send LiTE mailing list submissions to
[email protected]

To subscribe or unsubscribe via the World Wide Web, visit
http://mail.directfb.org/cgi-bin/mailman/listinfo/lite
or, via email, send a message with subject or body 'help' to
[email protected]

You can reach the person managing the list at [email protected]

When replying, please edit your Subject line so it is more specific than
"Re: Contents of LiTE digest..."


Today's Topics:

   1. [Lite] internationalization strategy (Jan Elmenthaler)


----------------------------------------------------------------------

Message: 1
Date: Thu, 18 Dec 2008 10:57:43 +0100
From: "Jan Elmenthaler"  <[email protected] >
Subject: [LiTE] [Lite] internationalization strategy
To: [email protected]
Message-ID:
<[email protected] >
Content-Type: text/plain; charset=ISO-8859-1

Hi there!

I just tried out to display some chinese characters on a LiTE textbutton
but only the square space holder is shown.

Loading either german, english or chinese descriptions from an ini file
works fine. I can see the chinese characters both in my log file and in
the telnet terminal connected with our powerPC but not on screen :(

Can anybody tell me if it is working in general and maybe offer me some
hints?

Thanks in advance,
Jan


------------------------------

_______________________________________________
LiTE mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/lite


End of LiTE Digest, Vol 4, Issue 4
**********************************


__________ Information from ESET NOD32 Antivirus, version of virus
signature database 3704 (20081218) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://mail.directfb.org/pipermail/lite/attachments/20081219/08d1f00c/at
tachment.html 

------------------------------

_______________________________________________
LiTE mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/lite


End of LiTE Digest, Vol 4, Issue 5
**********************************
_______________________________________________
LiTE mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/lite

Reply via email to