[vtkusers] How to display Chinese annotation?

Huiqun Zhou zhou_huiqun at hotmail.com
Tue Mar 16 10:44:42 EST 2004


I think you MAY need to make changes in VTK. Although I haven't checked the code,
I think that you need to search where it sets its CharMap() when VTK creates its 3D 
font by using FTGL, and see if it is already set to UNICODE. If yes, please forget 
what I write here and look for other cure (although I don't think so). If no, do something
like below:

// in a function that initializes a 3D font, say,
FTFont* initialize_3DFont(const char* name)
{
  ...
  FTFont* font_ = new FTGLExtrdFont;
  ...
  font_->CharMap(ft_encoding_unicode);
  ...
}

Hope this help. This is what I know about how to use Chinese characters with FTGL. VTK
should use it in similar way.


Huiqun Zhou
 
  ----- Original Message ----- 
  From: Yao Jifeng 
  To: vtkusers at vtk.org 
  Sent: Tuesday, March 16, 2004 9:52 PM
  Subject: [vtkusers] How to display Chinese annotation?


  hi vtkusers,

  do you have any ideas about how to show chinese characters
  in a vtk window? 

  i am working on ms windows system and i know how to 
  display chinese by using some opengl functions,such as 
  wglUseFontOutlinesW. 

  i noticed that vtk is now using  FTGL to display fonts, which
  really made me confused: should i modify the FTGL library or just
  the related vtk classes (vtkTextMapper,vtkOpenGLFreeTypeTextMapper)?

  thanks.

  Joey

  R&D Center for Parallel Computing
  Institue of Software, Chinese Academy of Sciences
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040316/f875dd0f/attachment.htm>


More information about the vtkusers mailing list