Represents TTF table definition. More...

Inherits System::Object.

Inherited by Aspose::Font::TtfTables::TtfCffTable, Aspose::Font::TtfTables::TtfCMapTable, Aspose::Font::TtfTables::TtfCvtTable, Aspose::Font::TtfTables::TtfFpgmTable, Aspose::Font::TtfTables::TtfGaspTable, Aspose::Font::TtfTables::TtfGlyfTable, Aspose::Font::TtfTables::TtfHeadTable, Aspose::Font::TtfTables::TtfHheaTable, Aspose::Font::TtfTables::TtfHmtxTable, Aspose::Font::TtfTables::TtfLocaTable, Aspose::Font::TtfTables::TtfLtshTable, Aspose::Font::TtfTables::TtfMaxpTable, Aspose::Font::TtfTables::TtfNameTable, Aspose::Font::TtfTables::TtfOs2Table, Aspose::Font::TtfTables::TtfPostTable, Aspose::Font::TtfTables::TtfPrepTable, Aspose::Font::TtfTables::TtfVheaTable, and Aspose::Font::TtfTables::TtfVmtxTable.

Public Member Functions

ASPOSE_FONT_SHARED_API System::SharedPtr< TtfTableRepositoryget_TtfTables () const
 Reference to TTF table repository. More...
 
ASPOSE_FONT_SHARED_API uint32_t get_Offset () const
 Gets offset from beginning of sfnt. More...
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared reference counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int32_t GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () const
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (uint32_t argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
virtual ASPOSECPP_SHARED_API bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool Equals (double const &objA, double const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 Specialization of Object::ReferenceEquals for case of string and nullptr. More...
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 Specialization of Object::ReferenceEquals for case of strings. More...
 

Protected Member Functions

System::SharedPtr< Aspose::Font::Ttf::Internals::TtfParserContext > get_Context () const
 parser context More...
 
bool get_IsNewFont () const
 indicates that the font is new More...
 
void set_IsNewFont (bool value)
 indicates that the font is new More...
 
bool get_IsModified () const
 Indicates data state in current table, if this flag is true - table data was changd and needed to be saved. More...
 
void set_IsModified (bool value)
 Indicates data state in current table, if this flag is true - table data was changd and needed to be saved. More...
 
ASPOSE_FONT_SHARED_API uint32_t get_Length () const
 Gets length of this table in bytes (actual length not padded length). More...
 
 TtfTableBase (System::SharedPtr< TtfTableRepository > ttfTables, System::SharedPtr< Aspose::Font::Ttf::TtfFont > font)
 
 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION (TtfTableBase, CODEPORTING_ARGS(System::SharedPtr< TtfTableRepository > ttfTables, System::SharedPtr< Aspose::Font::Ttf::TtfFont > font))
 
 TtfTableBase (System::SharedPtr< Aspose::Font::Ttf::Internals::TtfParserContext > context, uint32_t checkSum, uint32_t offset, uint32_t length)
 
 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION (TtfTableBase, CODEPORTING_ARGS(System::SharedPtr< Aspose::Font::Ttf::Internals::TtfParserContext > context, uint32_t checkSum, uint32_t offset, uint32_t length))
 
void LazyLoad ()
 
virtual ASPOSE_FONT_SHARED_API void LazyLoadImpl (System::SharedPtr< Aspose::Font::Ttf::Internals::Parsing::TTFFileReader > ttfReader)
 
virtual ASPOSE_FONT_SHARED_API bool IsConsistent ()
 
virtual ASPOSE_FONT_SHARED_API void Load (System::SharedPtr< Aspose::Font::Ttf::Internals::Parsing::TTFFileReader > ttfReader)
 Loads current table More...
 
virtual ASPOSE_FONT_SHARED_API void Save (System::ArrayPtr< uint8_t > &tableBytes, uint32_t &length, uint32_t &checksum)
 Saves the table to font stream More...
 
void LoadInitialBytes (System::ArrayPtr< uint8_t > &tableBytes, uint32_t &length, uint32_t &checksum)
 Read the initial data (all bytes) of the table and save it to array of bytes
Parameters
tableBytesArray of bytes of initial data
lengthOriginal value of length of the table
checksumOriginal value of checksum
More...
 
virtual ASPOSE_FONT_SHARED_API void SaveInitialBytes (System::ArrayPtr< uint8_t > &tableBytes, uint32_t &length, uint32_t &checksum)
 Saves the initial bytes of the table More...
 
void FinalizeWriting (System::SharedPtr< Aspose::Font::Ttf::Internals::Parsing::TTFFileWriter > writer, System::SharedPtr< System::IO::MemoryStream > stream, System::ArrayPtr< uint8_t > &tableBytes, uint32_t &length, uint32_t &checksum)
 
virtual ASPOSE_FONT_SHARED_API void AssignDataFrom (System::SharedPtr< TtfTableBase > table)
 Designed to copy data from another table with same type, for example hhea->hhea, hmtx->hmtx. This mechanism can be helpful when table of generated font needed to copy data from another existing font(not generated) to avoid problems with linking to data source(source table from existing font has link to data source(offset, length), but this link data is superfluous for destination table, so full copy (method like Copy()) is not decision for this case. Let the table takes necessary data via this assigning mechanism. More...
 

Static Protected Member Functions

static uint32_t CalculateChecksum (System::ArrayPtr< uint8_t > data)
 

Protected Attributes

bool IsLoaded
 Used to detect whether table already loaded More...
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Implements C# typeof(System.Object) construct. More...
 

Detailed Description

Represents TTF table definition.

Constructor & Destructor Documentation

◆ TtfTableBase() [1/2]

Aspose::Font::TtfTables::TtfTableBase::TtfTableBase ( System::SharedPtr< TtfTableRepository ttfTables,
System::SharedPtr< Aspose::Font::Ttf::TtfFont font 
)
protected

◆ TtfTableBase() [2/2]

Aspose::Font::TtfTables::TtfTableBase::TtfTableBase ( System::SharedPtr< Aspose::Font::Ttf::Internals::TtfParserContext >  context,
uint32_t  checkSum,
uint32_t  offset,
uint32_t  length 
)
protected

Member Function Documentation

◆ AssignDataFrom()

virtual ASPOSE_FONT_SHARED_API void Aspose::Font::TtfTables::TtfTableBase::AssignDataFrom ( System::SharedPtr< TtfTableBase table)
protectedvirtual

Designed to copy data from another table with same type, for example hhea->hhea, hmtx->hmtx. This mechanism can be helpful when table of generated font needed to copy data from another existing font(not generated) to avoid problems with linking to data source(source table from existing font has link to data source(offset, length), but this link data is superfluous for destination table, so full copy (method like Copy()) is not decision for this case. Let the table takes necessary data via this assigning mechanism.

Parameters
tabletable to get data from

Reimplemented in Aspose::Font::TtfTables::TtfNameTable, Aspose::Font::TtfTables::TtfOs2Table, Aspose::Font::TtfTables::TtfMaxpTable, Aspose::Font::TtfTables::TtfHmtxTable, Aspose::Font::TtfTables::TtfPostTable, Aspose::Font::TtfTables::TtfGaspTable, Aspose::Font::TtfTables::TtfHheaTable, Aspose::Font::TtfTables::TtfVmtxTable, Aspose::Font::TtfTables::TtfVheaTable, and Aspose::Font::TtfTables::TtfLtshTable.

◆ CalculateChecksum()

static uint32_t Aspose::Font::TtfTables::TtfTableBase::CalculateChecksum ( System::ArrayPtr< uint8_t >  data)
staticprotected

◆ FinalizeWriting()

void Aspose::Font::TtfTables::TtfTableBase::FinalizeWriting ( System::SharedPtr< Aspose::Font::Ttf::Internals::Parsing::TTFFileWriter >  writer,
System::SharedPtr< System::IO::MemoryStream stream,
System::ArrayPtr< uint8_t > &  tableBytes,
uint32_t &  length,
uint32_t &  checksum 
)
protected

◆ get_Context()

System::SharedPtr<Aspose::Font::Ttf::Internals::TtfParserContext> Aspose::Font::TtfTables::TtfTableBase::get_Context ( ) const
protected

parser context

◆ get_IsModified()

bool Aspose::Font::TtfTables::TtfTableBase::get_IsModified ( ) const
protected

Indicates data state in current table, if this flag is true - table data was changd and needed to be saved.

◆ get_IsNewFont()

bool Aspose::Font::TtfTables::TtfTableBase::get_IsNewFont ( ) const
protected

indicates that the font is new

◆ get_Length()

ASPOSE_FONT_SHARED_API uint32_t Aspose::Font::TtfTables::TtfTableBase::get_Length ( ) const
protected

Gets length of this table in bytes (actual length not padded length).

◆ get_Offset()

ASPOSE_FONT_SHARED_API uint32_t Aspose::Font::TtfTables::TtfTableBase::get_Offset ( ) const

Gets offset from beginning of sfnt.

◆ get_TtfTables()

ASPOSE_FONT_SHARED_API System::SharedPtr<TtfTableRepository> Aspose::Font::TtfTables::TtfTableBase::get_TtfTables ( ) const

Reference to TTF table repository.

◆ IsConsistent()

virtual ASPOSE_FONT_SHARED_API bool Aspose::Font::TtfTables::TtfTableBase::IsConsistent ( )
protectedvirtual

◆ LazyLoad()

void Aspose::Font::TtfTables::TtfTableBase::LazyLoad ( )
protected

◆ LazyLoadImpl()

◆ Load()

◆ LoadInitialBytes()

void Aspose::Font::TtfTables::TtfTableBase::LoadInitialBytes ( System::ArrayPtr< uint8_t > &  tableBytes,
uint32_t &  length,
uint32_t &  checksum 
)
protected

Read the initial data (all bytes) of the table and save it to array of bytes

Parameters
tableBytesArray of bytes of initial data
lengthOriginal value of length of the table
checksumOriginal value of checksum

◆ MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION() [1/2]

Aspose::Font::TtfTables::TtfTableBase::MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION ( TtfTableBase  ,
CODEPORTING_ARGS(System::SharedPtr< TtfTableRepository > ttfTables, System::SharedPtr< Aspose::Font::Ttf::TtfFont > font)   
)
protected

◆ MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION() [2/2]

Aspose::Font::TtfTables::TtfTableBase::MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION ( TtfTableBase  ,
CODEPORTING_ARGS(System::SharedPtr< Aspose::Font::Ttf::Internals::TtfParserContext > context, uint32_t checkSum, uint32_t offset, uint32_t length)   
)
protected

◆ Save()

◆ SaveInitialBytes()

virtual ASPOSE_FONT_SHARED_API void Aspose::Font::TtfTables::TtfTableBase::SaveInitialBytes ( System::ArrayPtr< uint8_t > &  tableBytes,
uint32_t &  length,
uint32_t &  checksum 
)
protectedvirtual

Saves the initial bytes of the table

◆ set_IsModified()

void Aspose::Font::TtfTables::TtfTableBase::set_IsModified ( bool  value)
protected

Indicates data state in current table, if this flag is true - table data was changd and needed to be saved.

◆ set_IsNewFont()

void Aspose::Font::TtfTables::TtfTableBase::set_IsNewFont ( bool  value)
protected

indicates that the font is new

Member Data Documentation

◆ IsLoaded

bool Aspose::Font::TtfTables::TtfTableBase::IsLoaded
protected

Used to detect whether table already loaded