Aspose::Slides::FontsManager Class Reference

Manages fonts across the presentation. More...

Inherits Aspose::Slides::IFontsManager.

Public Member Functions

System::SharedPtr< Aspose::Slides::IFontSubstRuleCollectionget_FontSubstRuleList () override
 Font substitutions to use when rendering. Read IFontSubstRuleCollection. More...
 
void set_FontSubstRuleList (System::SharedPtr< Aspose::Slides::IFontSubstRuleCollection > value) override
 Font substitutions to use when rendering. Write IFontSubstRuleCollection. More...
 
System::SharedPtr< Aspose::Slides::IFontFallBackRulesCollectionget_FontFallBackRulesCollection () override
 Represents a user's collection of FontFallBack rules for managing of collections of fonts for proper substitutions by fallback functionality Read IFontFallBackRulesCollection. More...
 
void set_FontFallBackRulesCollection (System::SharedPtr< Aspose::Slides::IFontFallBackRulesCollection > value) override
 Represents a user's collection of FontFallBack rules for managing of collections of fonts for proper substitutions by fallback functionality Write IFontFallBackRulesCollection. More...
 
System::ArrayPtr< System::SharedPtr< Aspose::Slides::IFontData > > GetFonts () override
 Returns the fonts used in the presentation More...
 
System::ArrayPtr< System::SharedPtr< Aspose::Slides::IFontData > > GetEmbeddedFonts () override
 Returns the fonts embedded in the presentation More...
 
void RemoveEmbeddedFont (System::SharedPtr< Aspose::Slides::IFontData > fontData) override
 Removes the embedded font More...
 
void AddEmbeddedFont (System::SharedPtr< Aspose::Slides::IFontData > fontData, Aspose::Slides::Export::EmbedFontCharacters embedFontRule) override
 Adds the embedded font More...
 
void AddEmbeddedFont (System::ArrayPtr< uint8_t > fontData, Aspose::Slides::Export::EmbedFontCharacters embedFontRule) override
 Adds the embedded font More...
 
void ReplaceFont (System::SharedPtr< Aspose::Slides::IFontData > sourceFont, System::SharedPtr< Aspose::Slides::IFontData > destFont) override
 Replace font in presentation More...
 
void ReplaceFont (System::SharedPtr< Aspose::Slides::IFontSubstRule > substRule) override
 Replace font in presentation using information provided in FontSubstRule More...
 
void ReplaceFont (System::SharedPtr< Aspose::Slides::IFontSubstRuleCollection > substRules) override
 Replace font in presentation using information provided in collection of FontSubstRule More...
 
- Public Member Functions inherited from Aspose::Slides::IFontsManager
virtual void set_FontSubstRuleList (System::SharedPtr< IFontSubstRuleCollection > value)=0
 Font substitutions to use when rendering Write IFontSubstRuleCollection. More...
 
virtual void set_FontFallBackRulesCollection (System::SharedPtr< IFontFallBackRulesCollection > value)=0
 Represents a user's collection of FontFallBack rules for managing of collections of fonts for proper substitutions by fallback functionality Write IFontFallBackRulesCollection. More...
 
virtual void RemoveEmbeddedFont (System::SharedPtr< IFontData > fontData)=0
 Removes the embedded font More...
 
virtual void AddEmbeddedFont (System::SharedPtr< IFontData > fontData, Export::EmbedFontCharacters embedFontRule)=0
 Adds the embedded font. More...
 
virtual void ReplaceFont (System::SharedPtr< IFontData > sourceFont, System::SharedPtr< IFontData > destFont)=0
 Replace font in presentation More...
 
virtual void ReplaceFont (System::SharedPtr< IFontSubstRule > substRule)=0
 Replace font in presentation using information provided in IFontSubstRule More...
 
virtual void ReplaceFont (System::SharedPtr< IFontSubstRuleCollection > substRules)=0
 Replace font in presentation using information provided in collection of IFontSubstRule More...
 
- Public Member Functions inherited from System::Object
 Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ~Object ()
 Destroys object. Frees all internal data structures. More...
 
 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...
 
void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual int32_t GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual String ToString () const
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual 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 bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. 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

virtual ~FontsManager ()
 

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...
 
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...
 

Detailed Description

Manages fonts across the presentation.

Constructor & Destructor Documentation

◆ ~FontsManager()

virtual Aspose::Slides::FontsManager::~FontsManager ( )
protectedvirtual

Member Function Documentation

◆ AddEmbeddedFont() [1/2]

void Aspose::Slides::FontsManager::AddEmbeddedFont ( System::ArrayPtr< uint8_t fontData,
Aspose::Slides::Export::EmbedFontCharacters  embedFontRule 
)
overridevirtual

Adds the embedded font

Keep in mind when copying any fonts that most fonts are copyrighted. First locate the license of a font before hand and verify they can be freely transferred to another machine.

Exceptions
System::ArgumentExceptionAn ArgumentException can be thrown if font data is null or this font is already embedded

Implements Aspose::Slides::IFontsManager.

◆ AddEmbeddedFont() [2/2]

void Aspose::Slides::FontsManager::AddEmbeddedFont ( System::SharedPtr< Aspose::Slides::IFontData fontData,
Aspose::Slides::Export::EmbedFontCharacters  embedFontRule 
)
override

Adds the embedded font

Keep in mind when copying any fonts that most fonts are copyrighted. First locate the license of a font before hand and verify they can be freely transferred to another machine.

Exceptions
System::ArgumentExceptionAn ArgumentException can be thrown if font data is null or this font is already embedded

◆ get_FontFallBackRulesCollection()

System::SharedPtr<Aspose::Slides::IFontFallBackRulesCollection> Aspose::Slides::FontsManager::get_FontFallBackRulesCollection ( )
overridevirtual

Represents a user's collection of FontFallBack rules for managing of collections of fonts for proper substitutions by fallback functionality Read IFontFallBackRulesCollection.

auto pres = MakeObject<Presentation>();
// Getting of empty or preinitialized rules collection from FontsManager
auto rulesList = pres->get_FontsManager()->get_FontFallBackRulesCollection();
// adding of rules to collection
rulesList->Add(MakeObject<FontFallBackRule>(0x400, 0x4FF, u"Times New Roman"));
// or
// initialization of new instance of rules collection
auto rulesList = MakeObject<FontFallBackRulesCollection>();
// adding of rules to collection
rulesList->Add(MakeObject<FontFallBackRule>(0x400, 0x4FF, u"Times New Roman"));
// and replacing of existing collection by the new one in FontsManager
pres->get_FontsManager()->set_FontFallBackRulesCollection(rulesList);

Implements Aspose::Slides::IFontsManager.

◆ get_FontSubstRuleList()

System::SharedPtr<Aspose::Slides::IFontSubstRuleCollection> Aspose::Slides::FontsManager::get_FontSubstRuleList ( )
overridevirtual

Font substitutions to use when rendering. Read IFontSubstRuleCollection.

Implements Aspose::Slides::IFontsManager.

◆ GetEmbeddedFonts()

System::ArrayPtr<System::SharedPtr<Aspose::Slides::IFontData> > Aspose::Slides::FontsManager::GetEmbeddedFonts ( )
overridevirtual

Returns the fonts embedded in the presentation

Implements Aspose::Slides::IFontsManager.

◆ GetFonts()

System::ArrayPtr<System::SharedPtr<Aspose::Slides::IFontData> > Aspose::Slides::FontsManager::GetFonts ( )
overridevirtual

Returns the fonts used in the presentation

Returns
An array of fonts

Implements Aspose::Slides::IFontsManager.

◆ RemoveEmbeddedFont()

void Aspose::Slides::FontsManager::RemoveEmbeddedFont ( System::SharedPtr< Aspose::Slides::IFontData fontData)
override

Removes the embedded font

◆ ReplaceFont() [1/3]

void Aspose::Slides::FontsManager::ReplaceFont ( System::SharedPtr< Aspose::Slides::IFontData sourceFont,
System::SharedPtr< Aspose::Slides::IFontData destFont 
)
override

Replace font in presentation

Parameters
sourceFontSource font
destFontDestination font

◆ ReplaceFont() [2/3]

void Aspose::Slides::FontsManager::ReplaceFont ( System::SharedPtr< Aspose::Slides::IFontSubstRule substRule)
override

Replace font in presentation using information provided in FontSubstRule

Parameters
substRuleFont substitution info

◆ ReplaceFont() [3/3]

void Aspose::Slides::FontsManager::ReplaceFont ( System::SharedPtr< Aspose::Slides::IFontSubstRuleCollection substRules)
override

Replace font in presentation using information provided in collection of FontSubstRule

Parameters
substRulesFont substitution rules collection

◆ set_FontFallBackRulesCollection()

void Aspose::Slides::FontsManager::set_FontFallBackRulesCollection ( System::SharedPtr< Aspose::Slides::IFontFallBackRulesCollection value)
override

Represents a user's collection of FontFallBack rules for managing of collections of fonts for proper substitutions by fallback functionality Write IFontFallBackRulesCollection.

auto pres = MakeObject<Presentation>();
// Getting of empty or preinitialized rules collection from FontsManager
auto rulesList = pres->get_FontsManager()->get_FontFallBackRulesCollection();
// adding of rules to collection
rulesList->Add(MakeObject<FontFallBackRule>(0x400, 0x4FF, u"Times New Roman"));
// or
// initialization of new instance of rules collection
auto rulesList = MakeObject<FontFallBackRulesCollection>();
// adding of rules to collection
rulesList->Add(MakeObject<FontFallBackRule>(0x400, 0x4FF, u"Times New Roman"));
// and replacing of existing collection by the new one in FontsManager
pres->get_FontsManager()->set_FontFallBackRulesCollection(rulesList);

◆ set_FontSubstRuleList()

void Aspose::Slides::FontsManager::set_FontSubstRuleList ( System::SharedPtr< Aspose::Slides::IFontSubstRuleCollection value)
override

Font substitutions to use when rendering. Write IFontSubstRuleCollection.