VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
vtkFontConfigFreeTypeTools Class Reference

Subclass of vtkFreeTypeTools that uses system installed fonts. More...

#include <vtkFontConfigFreeTypeTools.h>

Inheritance diagram for vtkFontConfigFreeTypeTools:
[legend]
Collaboration diagram for vtkFontConfigFreeTypeTools:
[legend]

Public Types

typedef vtkFreeTypeTools Superclass
 
- Public Types inherited from vtkFreeTypeTools
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkFontConfigFreeTypeToolsNewInstance () const
 
virtual void PrintSelf (ostream &os, vtkIndent indent)
 
- Public Member Functions inherited from vtkFreeTypeTools
vtkFreeTypeToolsNewInstance () const
 
FT_Library * GetLibrary ()
 
virtual void SetDebugTextures (bool)
 
virtual bool GetDebugTextures ()
 
virtual void DebugTexturesOn ()
 
virtual void DebugTexturesOff ()
 
virtual void SetMaximumNumberOfFaces (unsigned int)
 
virtual unsigned int GetMaximumNumberOfFaces ()
 
virtual void SetMaximumNumberOfSizes (unsigned int)
 
virtual unsigned int GetMaximumNumberOfSizes ()
 
virtual void SetMaximumNumberOfBytes (unsigned long)
 
virtual unsigned long GetMaximumNumberOfBytes ()
 
bool GetBoundingBox (vtkTextProperty *tprop, const vtkStdString &str, int dpi, int bbox[4])
 
bool GetBoundingBox (vtkTextProperty *tprop, const vtkUnicodeString &str, int dpi, int bbox[4])
 
bool GetMetrics (vtkTextProperty *tprop, const vtkStdString &str, int dpi, vtkTextRenderer::Metrics &metrics)
 
bool GetMetrics (vtkTextProperty *tprop, const vtkUnicodeString &str, int dpi, vtkTextRenderer::Metrics &metrics)
 
bool RenderString (vtkTextProperty *tprop, const vtkStdString &str, int dpi, vtkImageData *data, int textDims[2]=NULL)
 
bool RenderString (vtkTextProperty *tprop, const vtkUnicodeString &str, int dpi, vtkImageData *data, int textDims[2]=NULL)
 
bool StringToPath (vtkTextProperty *tprop, const vtkStdString &str, int dpi, vtkPath *path)
 
bool StringToPath (vtkTextProperty *tprop, const vtkUnicodeString &str, int dpi, vtkPath *path)
 
int GetConstrainedFontSize (const vtkStdString &str, vtkTextProperty *tprop, int dpi, int targetWidth, int targetHeight)
 
int GetConstrainedFontSize (const vtkUnicodeString &str, vtkTextProperty *tprop, int dpi, int targetWidth, int targetHeight)
 
void MapTextPropertyToId (vtkTextProperty *tprop, size_t *tprop_cache_id)
 
void MapIdToTextProperty (size_t tprop_cache_id, vtkTextProperty *tprop)
 
virtual void SetScaleToPowerTwo (bool)
 
virtual bool GetScaleToPowerTwo ()
 
virtual void ScaleToPowerTwoOn ()
 
virtual void ScaleToPowerTwoOff ()
 
virtual void SetForceCompiledFonts (bool)
 
virtual bool GetForceCompiledFonts ()
 
virtual void ForceCompiledFontsOn ()
 
virtual void ForceCompiledFontsOff ()
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkFontConfigFreeTypeToolsSafeDownCast (vtkObjectBase *o)
 
static vtkFontConfigFreeTypeToolsNew ()
 
static bool LookupFaceFontConfig (vtkTextProperty *tprop, FT_Library lib, FT_Face *face)
 
- Static Public Member Functions inherited from vtkFreeTypeTools
static int IsTypeOf (const char *type)
 
static vtkFreeTypeToolsSafeDownCast (vtkObjectBase *o)
 
static vtkFreeTypeToolsGetInstance ()
 
static void SetInstance (vtkFreeTypeTools *instance)
 
static vtkTypeUInt16 HashString (const char *str)
 
static bool LookupFace (vtkTextProperty *tprop, FT_Library lib, FT_Face *face)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkFontConfigFreeTypeTools ()
 
 ~vtkFontConfigFreeTypeTools ()
 
FT_Error CreateFTCManager ()
 
- Protected Member Functions inherited from vtkFreeTypeTools
void PrepareImageData (vtkImageData *data, int bbox[4])
 
bool GetSize (vtkTextProperty *tprop, FT_Size *size)
 
bool GetFace (vtkTextProperty *tprop, FT_Face *face)
 
bool GetGlyphIndex (vtkTextProperty *tprop, FT_UInt32 c, FT_UInt *gindex)
 
 vtkFreeTypeTools ()
 
virtual ~vtkFreeTypeTools ()
 
void InitializeCacheManager ()
 
void ReleaseCacheManager ()
 
bool PrepareMetaData (vtkTextProperty *tprop, int dpi, MetaData &metaData)
 
bool PrepareImageMetaData (vtkTextProperty *tprop, vtkImageData *image, ImageMetaData &metaData)
 
void RenderBackground (vtkTextProperty *tprop, vtkImageData *image, ImageMetaData &metaData)
 
bool GetFace (vtkTextProperty *prop, size_t &prop_cache_id, FT_Face &face, bool &face_has_kerning)
 
FT_Bitmap * GetBitmap (FT_UInt32 c, size_t prop_cache_id, int prop_font_size, FT_UInt &gindex, FT_BitmapGlyph &bitmap_glyph)
 
FT_Bitmap * GetBitmap (FT_UInt32 c, FTC_Scaler scaler, FT_UInt &gindex, FT_BitmapGlyph &bitmap_glyph)
 
FT_Outline * GetOutline (FT_UInt32 c, size_t prop_cache_id, int prop_font_size, FT_UInt &gindex, FT_OutlineGlyph &outline_glyph)
 
FT_Outline * GetOutline (FT_UInt32 c, FTC_Scaler scaler, FT_UInt &gindex, FT_OutlineGlyph &outline_glyph)
 
FTC_Manager * GetCacheManager ()
 
FTC_ImageCache * GetImageCache ()
 
FTC_CMapCache * GetCMapCache ()
 
bool GetGlyph (vtkTextProperty *tprop, FT_UInt32 c, FT_Glyph *glyph, int request=GLYPH_REQUEST_DEFAULT)
 
bool GetSize (size_t tprop_cache_id, int font_size, FT_Size *size)
 
bool GetSize (FTC_Scaler scaler, FT_Size *size)
 
bool GetFace (size_t tprop_cache_id, FT_Face *face)
 
bool GetGlyphIndex (size_t tprop_cache_id, FT_UInt32 c, FT_UInt *gindex)
 
bool GetGlyph (size_t tprop_cache_id, int font_size, FT_UInt gindex, FT_Glyph *glyph, int request=GLYPH_REQUEST_DEFAULT)
 
bool GetGlyph (FTC_Scaler scaler, FT_UInt gindex, FT_Glyph *glyph, int request=GLYPH_REQUEST_DEFAULT)
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Additional Inherited Members

- Protected Types inherited from vtkFreeTypeTools
enum  { GLYPH_REQUEST_DEFAULT = 0, GLYPH_REQUEST_BITMAP = 1, GLYPH_REQUEST_OUTLINE = 2 }
 
- Protected Attributes inherited from vtkFreeTypeTools
bool ScaleToPowerTwo
 
vtkTextPropertyLookup * TextPropertyLookup
 
unsigned int MaximumNumberOfFaces
 
unsigned int MaximumNumberOfSizes
 
unsigned long MaximumNumberOfBytes
 
bool ForceCompiledFonts
 
bool DebugTextures
 
FTC_Manager * CacheManager
 
FTC_ImageCache * ImageCache
 
FTC_CMapCache * CMapCache
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 
- Static Protected Attributes inherited from vtkFreeTypeTools
static vtkFreeTypeToolsInstance
 
static vtkFreeTypeToolsCleanup Cleanup
 

Detailed Description

Subclass of vtkFreeTypeTools that uses system installed fonts.

vtkFontConfigFreeTypeTools defers to vtkFreeTypeTools for rendering and rasterization, but sources fonts from a FontConfig system lookup. If the lookup fails, the compiled fonts of vtkFreeType are used instead.

Warning
Do not instantiate this class directly. Rather, call vtkFreeTypeTools::GetInstance() to ensure that the singleton design is correctly applied. Be aware that FontConfig lookup is disabled by default. To enable, call vtkFreeTypeTools::GetInstance()->ForceCompiledFontsOff();

Definition at line 39 of file vtkFontConfigFreeTypeTools.h.

Member Typedef Documentation

Definition at line 43 of file vtkFontConfigFreeTypeTools.h.

Constructor & Destructor Documentation

vtkFontConfigFreeTypeTools::vtkFontConfigFreeTypeTools ( )
protected
vtkFontConfigFreeTypeTools::~vtkFontConfigFreeTypeTools ( )
protected

Member Function Documentation

static int vtkFontConfigFreeTypeTools::IsTypeOf ( const char *  type)
static
virtual int vtkFontConfigFreeTypeTools::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkFreeTypeTools.

static vtkFontConfigFreeTypeTools* vtkFontConfigFreeTypeTools::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkFontConfigFreeTypeTools::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkFreeTypeTools.

vtkFontConfigFreeTypeTools* vtkFontConfigFreeTypeTools::NewInstance ( ) const
virtual void vtkFontConfigFreeTypeTools::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkFreeTypeTools.

static vtkFontConfigFreeTypeTools* vtkFontConfigFreeTypeTools::New ( )
static

Creates a new object of this type, but it is not preferred to use this method directly. Instead, call vtkFreeTypeTools::GetInstance() and let the object factory create a new instance. In this way the singleton pattern of vtkFreeTypeTools is preserved.

static bool vtkFontConfigFreeTypeTools::LookupFaceFontConfig ( vtkTextProperty tprop,
FT_Library  lib,
FT_Face *  face 
)
static

Modified version of vtkFreeTypeTools::LookupFace that locates FontConfig faces. Falls back to the Superclass method for compiled fonts if the FontConfig lookup fails.

FT_Error vtkFontConfigFreeTypeTools::CreateFTCManager ( )
protectedvirtual

Reimplemented from Superclass to use the FontConfig face lookup callback.

Reimplemented from vtkFreeTypeTools.


The documentation for this class was generated from the following file: