Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

DWFToolkit::DWFEmbeddedFontImpl_Win32 Class Reference

Inheritance diagram for DWFToolkit::DWFEmbeddedFontImpl_Win32:

Inheritance graph
[legend]
Collaboration diagram for DWFToolkit::DWFEmbeddedFontImpl_Win32:

Collaboration graph
[legend]
List of all members.

Detailed Description

TrueType font embedding implementation for Microsoft Windows GDI Font Engine.
Since:
7.0.1.

'

This implementation uses the T2Embed API.

Definition at line 79 of file EmbeddedFontImpl.h.

Public Member Functions

_DWFTK_API DWFEmbeddedFontImpl_Win32 (HFONT hFont, size_t nHeapLimit=DWFTK_EMBEDDED_FONT_HEAP_LIMIT) throw ()
_DWFTK_API DWFEmbeddedFontImpl_Win32 (DWFFontResource &rFontResource) throw ()
virtual _DWFTK_API ~DWFEmbeddedFontImpl_Win32 () throw ()
_DWFTK_API void embed () throw ( DWFException )
_DWFTK_API void addCharacters (const DWFString &rCharacters) throw ( DWFException )
_DWFTK_API DWFInputStreamgetInputStream () throw ( DWFException )
_DWFTK_API const DWFStringgetFaceName () throw ( DWFException )
_DWFTK_API const DWFStringgetLogfontName () throw ( DWFException )
_DWFTK_API int getRequest () throw ( DWFException )
_DWFTK_API DWFFontResource::tePrivilege getPrivilege () throw ( DWFException )
_DWFTK_API DWFFontResource::teCharacterCode getCharacterCode () throw ( DWFException )
_DWFTK_API void load (bool bForceRename=true) throw ( DWFException )
_DWFTK_API const DWFStringloadedFontName () const throw ()
_DWFTK_API void unload () throw ( DWFException )


Constructor & Destructor Documentation

_DWFTK_API DWFToolkit::DWFEmbeddedFontImpl_Win32::DWFEmbeddedFontImpl_Win32 HFONT  hFont,
size_t  nHeapLimit = DWFTK_EMBEDDED_FONT_HEAP_LIMIT
throw ()
 

Constructor

Use this contructor when this implementation engine will be used for generating embedded font data from a GDI font resource.

Parameters:
hFont A GDI font handle.
nHeapLimit In order to facilitate the fastest possible process, this implementation will always serialize the EFF from the MS API into a heap memory buffer. When getInputStream() is called, this buffer will be flushed to a temporary disk file if it's size exceeds this limit value. The rationale behind this mechanism is that if many fonts are in use it's possible that they could consume quite a bit of RAM. Further, and maybe more importantly, while in some (most?) cases getting the input stream is proceeded immediately by publishing it to a DWF file, it is not always true. If this stream is instead going to passed around - especially to a remote client - then you definitely don't want your memory tied up. If you never want to go to disk, then simply make this value very large, like 512K or 1MB. DWFTK_EMBEDDED_FONT_HEAP_LIMIT is preferred to be set to hold a "usual" embedded font in memory - say 10k to 20k - so that no disk i/o becomes necessary at publish time.
Exceptions:
None 

_DWFTK_API DWFToolkit::DWFEmbeddedFontImpl_Win32::DWFEmbeddedFontImpl_Win32 DWFFontResource rFontResource  )  throw ()
 

Constructor

Use this contructor when this implementation engine will be used for loading an embedded font resource into the GDI font engine.

Parameters:
rFontResource A toolkit package object from which the embedded font data can be read.
Exceptions:
None 

virtual _DWFTK_API DWFToolkit::DWFEmbeddedFontImpl_Win32::~DWFEmbeddedFontImpl_Win32  )  throw () [virtual]
 

Destructor

Exceptions:
None 


Member Function Documentation

_DWFTK_API void DWFToolkit::DWFEmbeddedFontImpl_Win32::addCharacters const DWFString rCharacters  )  throw ( DWFException ) [virtual]
 

Identifies which character glyphs to embed.

This is an additive operation. Generally, an embedded font object is created for each TrueType font that should be published. For every string (or character) that is added to the scene that must be rendered in an embedded font, that string (or character) is sent to this method. If possible, only those data for the final character subset should be embedded.

The following are equivalent:

  1.                     pFont->addCharacters( L"This is some text" );
                        pFont->addCharacters( L"Doors and Windows" );
    
  2.                     pFont->addCharacters( L"adehimnorstwxDTW" );
    

Parameters:
rCharacters The Unicode character string.
Exceptions:
DWFException 

Implements DWFToolkit::DWFEmbeddedFontImpl.

_DWFTK_API void DWFToolkit::DWFEmbeddedFontImpl_Win32::embed  )  throw ( DWFException ) [virtual]
 

Captures the embeddable font data.

This method should be invoked once after addCharacters() to use the engine implementation to perform it's work and extract, compress, etc. the font data. The next call to getInputStream() will provide the data generated from this operation.

Exceptions:
DWFException 

Implements DWFToolkit::DWFEmbeddedFontImpl.

_DWFTK_API DWFFontResource::teCharacterCode DWFToolkit::DWFEmbeddedFontImpl_Win32::getCharacterCode  )  throw ( DWFException ) [virtual]
 

Returns the character code for the embedded font

Returns:
The character code enumeration.
Exceptions:
DWFException 

Implements DWFToolkit::DWFEmbeddedFontImpl.

_DWFTK_API const DWFString& DWFToolkit::DWFEmbeddedFontImpl_Win32::getFaceName  )  throw ( DWFException ) [virtual]
 

Returns the canonical face name of the font.

Returns:
The font name.
Exceptions:
DWFException 

Implements DWFToolkit::DWFEmbeddedFontImpl.

_DWFTK_API DWFInputStream* DWFToolkit::DWFEmbeddedFontImpl_Win32::getInputStream  )  throw ( DWFException ) [virtual]
 

Provides a stream to read the embeddable font data obtained from a previous call to embed().

Returns:
A pointer to a data stream. The caller is responsible for deleting the pointer with DWFCORE_FREE_OBJECT.
Exceptions:
DWFException 

Implements DWFToolkit::DWFEmbeddedFontImpl.

_DWFTK_API const DWFString& DWFToolkit::DWFEmbeddedFontImpl_Win32::getLogfontName  )  throw ( DWFException ) [virtual]
 

Returns the logfont face name of the font.

Returns:
The font name.
Exceptions:
DWFException 

Implements DWFToolkit::DWFEmbeddedFontImpl.

_DWFTK_API DWFFontResource::tePrivilege DWFToolkit::DWFEmbeddedFontImpl_Win32::getPrivilege  )  throw ( DWFException ) [virtual]
 

Returns the privilege with which the font was embedded

Returns:
The privilege enumeration.
Exceptions:
DWFException 

Implements DWFToolkit::DWFEmbeddedFontImpl.

_DWFTK_API int DWFToolkit::DWFEmbeddedFontImpl_Win32::getRequest  )  throw ( DWFException ) [virtual]
 

Returns the request flag with which the font was embedded.

Returns:
The request flag.
Exceptions:
DWFException 

Implements DWFToolkit::DWFEmbeddedFontImpl.

_DWFTK_API void DWFToolkit::DWFEmbeddedFontImpl_Win32::load bool  bForceRename = true  )  throw ( DWFException ) [virtual]
 

Loads the given font from an embedded data representation into the font engine.

Exceptions:
DWFException 

Implements DWFToolkit::DWFEmbeddedFontImpl.

_DWFTK_API const DWFString& DWFToolkit::DWFEmbeddedFontImpl_Win32::loadedFontName  )  const throw () [virtual]
 

Returns the name under which the font was loaded.

Returns:
The (temporary) font name.
Exceptions:
DWFException 

Implements DWFToolkit::DWFEmbeddedFontImpl.

_DWFTK_API void DWFToolkit::DWFEmbeddedFontImpl_Win32::unload  )  throw ( DWFException ) [virtual]
 

Unloads the embedded font from the font engine.

Exceptions:
DWFException 

Implements DWFToolkit::DWFEmbeddedFontImpl.


The documentation for this class was generated from the following file:
Generated on Sat May 7 09:35:12 2005 for Autodesk DWF Toolkit by  doxygen 1.4.1