Print chinese character

7 views
Skip to first unread message

trainee

unread,
Dec 1, 2009, 7:53:11 AM12/1/09
to SWT PaperClips
Hi,

how can i print chinese character using paperclips? I am using
something like this :
grid.add(new TextPrint(bean.getChineseWords())) , but the chinese
words is not coming out.


Thanks and regards,
trainee

Matthew Hall

unread,
Dec 1, 2009, 10:05:44 AM12/1/09
to SWT PaperClips
Hello. By default the TextPrint(String) constructor uses the default
text style, which in turn uses the system default font. Maybe
explicitly choose a font known to contain those characters?

grid.add(new TextPrint(bean.getChineseWords(), new TextStyle().font
(aFontWithChineseGlyphs)));

Matthew

jiayee

unread,
Dec 2, 2009, 5:07:28 AM12/2/09
to swt-pap...@googlegroups.com
Hi Matthew,

Thanks. I managed to display the chinese character now, it was font
issue. I am setting my text font to 'PMingLiU' in order to display the
chinese character.

Regards,
trainee
> --
>
> You received this message because you are subscribed to the Google Groups "SWT PaperClips" group.
> To post to this group, send email to swt-pap...@googlegroups.com.
> To unsubscribe from this group, send email to swt-paperclip...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/swt-paperclips?hl=en.
>
>
>
Reply all
Reply to author
Forward
0 new messages