Skip to content

Commit

Permalink
FIX: enable UTF8 text rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Nolden committed Jun 29, 2010
1 parent d0cf3eb commit 9ba9588
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Rendering/vtkFreeTypeUtilities.cxx
Expand Up @@ -663,7 +663,7 @@ int vtkFreeTypeUtilities::GetFace(vtkTextProperty *tprop,

//----------------------------------------------------------------------------
int vtkFreeTypeUtilities::GetGlyphIndex(unsigned long tprop_cache_id,
char c,
FT_UInt32 c,
FT_UInt *gindex)
{
#if VTK_FTFC_DEBUG_CD
Expand Down Expand Up @@ -705,7 +705,7 @@ int vtkFreeTypeUtilities::GetGlyphIndex(unsigned long tprop_cache_id,

//----------------------------------------------------------------------------
int vtkFreeTypeUtilities::GetGlyphIndex(vtkTextProperty *tprop,
char c,
FT_UInt32 c,
FT_UInt *gindex)
{
if (!tprop)
Expand Down Expand Up @@ -929,7 +929,7 @@ int vtkFreeTypeUtilities::GetBoundingBox(vtkTextProperty *tprop,
}

// Get the glyph index
if (!this->GetGlyphIndex(tprop_cache_id, *str, &gindex))
if (!this->GetGlyphIndex(tprop_cache_id,(unsigned char)*str, &gindex))
{
continue;
}
Expand Down Expand Up @@ -1169,7 +1169,7 @@ int vtkFreeTypeUtilities::PopulateImageData(vtkTextProperty *tprop,
}

// Get the glyph index
if (!this->GetGlyphIndex(tprop_cache_id, *str, &gindex))
if (!this->GetGlyphIndex(tprop_cache_id, (unsigned char)*str, &gindex))
{
continue;
}
Expand Down
4 changes: 2 additions & 2 deletions Rendering/vtkFreeTypeUtilities.h
Expand Up @@ -123,7 +123,7 @@ class VTK_RENDERING_EXPORT vtkFreeTypeUtilities : public vtkObject
// Return true on success, false otherwise
// This method is successful
// only when FreeType version is >= 2.1.9
int GetGlyphIndex(vtkTextProperty *tprop, char c, FT_UInt *gindex);
int GetGlyphIndex(vtkTextProperty *tprop, FT_UInt32 c, FT_UInt *gindex);

// Description:
// Given a text property and a character, get the corresponding FreeType
Expand Down Expand Up @@ -199,7 +199,7 @@ class VTK_RENDERING_EXPORT vtkFreeTypeUtilities : public vtkObject
// only when FreeType version is >= 2.1.9
int GetSize(unsigned long tprop_cache_id, int font_size, FT_Size *size);
int GetFace(unsigned long tprop_cache_id, FT_Face *face);
int GetGlyphIndex(unsigned long tprop_cache_id, char c, FT_UInt *gindex);
int GetGlyphIndex(unsigned long tprop_cache_id, FT_UInt32 c, FT_UInt *gindex);
int GetGlyph(unsigned long tprop_cache_id,
int font_size,
FT_UInt gindex,
Expand Down

0 comments on commit 9ba9588

Please sign in to comment.