Aspose::Font::Type1::Type1MetricFont Class Reference

Type1 metric font implementation. This type1 font is created using metrics only. Glyphs retrieval functions and some other that require real font are not allowed, not allowed functions throw exception Type1NotSupportedException. Other properties (FontName, Weight, Metrics and Encoding) are used from metrics file. More...

Inherits Aspose::Font::Type1::Type1Font.

Public Member Functions

ASPOSE_FONT_SHARED_API System::SharedPtr< IFontEncodingget_Encoding () override
 Encoding is defined in metrics file. StandardAdobeEncoding: the encoding is populated automatically More...
 
ASPOSE_FONT_SHARED_API System::String get_FontFamily () override
 Gets Font family. More...
 
ASPOSE_FONT_SHARED_API System::String get_FontName () override
 Gets Font name. More...
 
ASPOSE_FONT_SHARED_API System::String get_Style () override
 Gets Font style. More...
 
ASPOSE_FONT_SHARED_API Aspose::Font::FontStyle get_FontStyle () override
 Gets Font style. This is a value computed and represented in generalized type. More...
 
ASPOSE_FONT_SHARED_API int32_t get_NumGlyphs () override
 Gets number of glyphs in the Font. More...
 
ASPOSE_FONT_SHARED_API System::SharedPtr< Aspose::Font::Glyphs::GlyphGetGlyphById (System::String id) override
 Returns glyph by glyph id. Not supported for Type1MetricFont type. More...
 
ASPOSE_FONT_SHARED_API System::SharedPtr< Aspose::Font::Glyphs::GlyphGetGlyphById (System::SharedPtr< Aspose::Font::Glyphs::GlyphId > id) override
 Returns glyph by glyph id. Not supported for Type1MetricFont type. More...
 
ASPOSE_FONT_SHARED_API System::ArrayPtr< System::SharedPtr< Aspose::Font::Glyphs::GlyphId > > GetAllGlyphIds () override
 Returns all glyph ids, available in the Font. Not supported for Type1MetricFont type. More...
 
- Public Member Functions inherited from Aspose::Font::Type1::Type1Font
ASPOSE_FONT_SHARED_API Aspose::Font::FontType get_FontType () override
 Gets Font type. Returns FontType.Type1 value. More...
 
ASPOSE_FONT_SHARED_API void set_FontFamily (System::String value) override
 Gets Font family. The Font family setter is not implemented yet. More...
 
ASPOSE_FONT_SHARED_API void set_FontName (System::String value) override
 Gets Font face name. The Font face name setter is not implemented yet. More...
 
ASPOSE_FONT_SHARED_API System::SharedPtr< MultiLanguageStringget_FontNames () override
 Gets Font names. More...
 
ASPOSE_FONT_SHARED_API System::SharedPtr< MultiLanguageStringget_PostscriptNames () override
 Gets postscript Font names. More...
 
ASPOSE_FONT_SHARED_API void set_Style (System::String value) override
 Gets Font style. This is a raw string value provided by Font file. The Style setter is not implemented yet. More...
 
ASPOSE_FONT_SHARED_API System::SharedPtr< IFontMetricsget_Metrics () override
 Gets Font metrics. More...
 
ASPOSE_FONT_SHARED_API Aspose::Font::Glyphs::GlyphIdType get_GlyphIdType () override
 Glyph id type specification. More...
 
ASPOSE_FONT_SHARED_API System::SharedPtr< Aspose::Font::Sources::FontDefinitionget_FontDefinition () override
 Gets Font definition. More...
 
ASPOSE_FONT_SHARED_API System::SharedPtr< Aspose::Font::Glyphs::GlyphGetGlyphById (uint32_t id)
 Returns glyph by glyph id. More...
 
ASPOSE_FONT_SHARED_API System::SharedPtr< Aspose::Font::Glyphs::GlyphGetGlyphById (System::SharedPtr< Aspose::Font::Glyphs::GlyphId > id) override
 Returns glyph by glyph id. Glyph id is a unique number for a glyph, which is font type dependent. Type1 Font glyph id can be instance of (GlyphStringId) class or (GlyphUInt32Id) class. More...
 
ASPOSE_FONT_SHARED_API System::SharedPtr< Aspose::Font::FontConvert (Aspose::Font::FontType fontType) override
 Converts the Font into another format. More...
 
- Public Member Functions inherited from Aspose::Font::Font
ASPOSE_FONT_SHARED_API System::SharedPtr< Glyphs::IGlyphAccessorget_GlyphAccessor () override
 Font glyph accessor. Retrieves glyphs and glyph identifiers. More...
 
ASPOSE_FONT_SHARED_API System::SharedPtr< IFontSaverget_FontSaver () override
 Gets Font save functionality. More...
 
ASPOSE_FONT_SHARED_API void Save (System::SharedPtr< System::IO::Stream > stream) override
 Saves the Font into original format. More...
 
ASPOSE_FONT_SHARED_API void Save (System::String fileName) override
 Saves the Font into original format. More...
 
ASPOSE_FONT_SHARED_API void SaveToFormat (System::SharedPtr< System::IO::Stream > stream, FontSavingFormats outFormat) override
 Saves the Font into format specified. More...
 
ASPOSE_FONT_SHARED_API System::ArrayPtr< System::SharedPtr< Glyphs::GlyphId > > GetGlyphsForText (System::String text) override
 Gets glyphs representation for text. More...
 
ASPOSE_FONT_SHARED_API System::SharedPtr< Glyphs::GlyphGetGlyphById (System::SharedPtr< Glyphs::GlyphId > id) override=0
 Returns glyph by glyph id. Glyph id is a unique number for a glyph, which is font type dependent. GlyphId - derived object. For example: Type1's id is a glyph name, instance of (GlyphStringId) class. TTF's id is an int index, instance of (GlyphUInt32Id) class. 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...
 
- Public Member Functions inherited from Aspose::Font::Glyphs::IGlyphAccessor
virtual System::SharedPtr< GlyphGetGlyphById (System::SharedPtr< GlyphId > id)=0
 Returns glyph by glyph id. Glyph id is a unique number for a glyph, which is font type dependent. GlyphId - derived object. For example: Type1's id is a glyph name, instance of (GlyphStringId) class. TTF's id is an int index, instance of (GlyphUInt32Id) class. More...
 
- Public Member Functions inherited from Aspose::Font::Licensing::IVentureLicenseTarget
virtual void SetVentureLicense (System::SharedPtr< VentureLicense > license)=0
 

Protected Member Functions

ASPOSE_FONT_SHARED_API System::SharedPtr< Aspose::Font::Type1::Internals::Type1FontDictionary > get_Type1FontDictionary () override
 Type1 file format dictionary "Type1FontDictionary" More...
 
ASPOSE_FONT_SHARED_API void set_Type1FontDictionary (System::SharedPtr< Aspose::Font::Type1::Internals::Type1FontDictionary > value) override
 Type1 file format dictionary "Type1FontDictionary" More...
 
 Type1MetricFont (System::SharedPtr< Aspose::Font::Sources::FontDefinition > fontDefinition)
 Internal constructor. A factory should be used to create the font More...
 
 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION (Type1MetricFont, CODEPORTING_ARGS(System::SharedPtr< Aspose::Font::Sources::FontDefinition > fontDefinition))
 
- Protected Member Functions inherited from Aspose::Font::Type1::Type1Font
System::SharedPtr< System::Collections::Generic::List< double > > get_SeacSequence () const
 the SeacSequence is used to control stack overflow with incorrect seac declarations in Type1 fonts More...
 
ASPOSE_FONT_SHARED_API void set_FontNames (System::SharedPtr< MultiLanguageString > value) override
 Gets Font names. More...
 
ASPOSE_FONT_SHARED_API void set_PostscriptNames (System::SharedPtr< MultiLanguageString > value) override
 Gets postscript Font names. More...
 
 Type1Font (System::SharedPtr< Aspose::Font::Sources::FontDefinition > fontDefinition)
 Internal constructor. A factory should be used to create the font More...
 
 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION (Type1Font, CODEPORTING_ARGS(System::SharedPtr< Aspose::Font::Sources::FontDefinition > fontDefinition))
 
void SetFontFamilyInternally (System::String value)
 Internal Font family setter. More...
 
void SetFontNameInternally (System::String value)
 Internal Font face name setter. More...
 
void SetStyleInternally (System::String value)
 Internal Style setter. More...
 
ASPOSE_FONT_SHARED_API System::SharedPtr< IFontSubsetDoSubset () override
 Creates font subset More...
 
virtual ASPOSE_FONT_SHARED_API ~Type1Font ()
 
- Protected Member Functions inherited from Aspose::Font::Font
System::SharedPtr< Rendering::FontRenderingContext > get_RenderingContext () const
 
bool get_IsVentureLicensed ()
 Gets venture licensed state of the object. Returns true if font has venture license and false otherwise. More...
 
System::SharedPtr< Common::LicenseControl::IFontLicenseController > get_LicenseController () const
 
 Font ()
 
void Save (System::SharedPtr< System::IO::Stream > stream, Font::FontSaveRequirements saveRequirements)
 
void Save (System::String fileName, Font::FontSaveRequirements saveRequirements)
 
void SetLicenseController (System::SharedPtr< Common::LicenseControl::IFontLicenseController > value)
 
virtual ASPOSE_FONT_SHARED_API ~Font ()
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
- Static Public Member Functions inherited from Aspose::Font::Font
static ASPOSE_FONT_SHARED_API System::SharedPtr< Aspose::Font::FontOpen (System::SharedPtr< Aspose::Font::Sources::FontDefinition > fontDefinition)
 Opens a font, using FontDefinition object. More...
 
static ASPOSE_FONT_SHARED_API System::SharedPtr< Aspose::Font::FontOpen (Aspose::Font::FontType fontType, System::SharedPtr< Sources::StreamSource > fontStreamSource)
 Opens a font, using font type and stream source. More...
 
static ASPOSE_FONT_SHARED_API System::SharedPtr< Aspose::Font::FontOpen (Aspose::Font::FontType fontType, System::String fileName)
 Opens a font, using font type and font file name. More...
 
static ASPOSE_FONT_SHARED_API System::SharedPtr< Aspose::Font::FontOpen (Aspose::Font::FontType fontType, System::ArrayPtr< uint8_t > fontData)
 Opens a font, using font type and font data byte array. 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...
 
- Protected Types inherited from Aspose::Font::Font
enum  FontSaveRequirements : uint8_t { FontSaveRequirements::SaveAllTables, FontSaveRequirements::SavePdfTables }
 
- Static Protected Member Functions inherited from Aspose::Font::Font
static System::SharedPtr< Aspose::Font::FontOpen (System::SharedPtr< IFontSource > fontSource, System::SharedPtr< Sources::IFontSearcher > fontSearchSpec)
 Opens a font: searches for the Font in font source, represented with IFontSource. More...
 
static System::SharedPtr< Aspose::Font::FontCreate (Aspose::Font::FontType fontType)
 Creates new font. More...
 
static System::SharedPtr< Aspose::Font::FontCreate (Aspose::Font::FontType fontType, System::SharedPtr< Aspose::Font::Font > baseFont, System::SharedPtr< FontAdoptionOptions > fontAdoptionOptions)
 Creates new font based on other font. FontAdoptionOptions object defines a way how the baseFont is used with the new font creation. More...
 
static void SplitSubsetFontName (System::String subsetFontName, System::String &fontName, System::String &subsetTag)
 Splits subset font name and returns font name and subset tag More...
 
static Aspose::Font::FontStyle ParseAndGeneralizeFontStyle (System::String fontStyle)
 Parsing the font style information More...
 
- Protected Attributes inherited from Aspose::Font::Font
System::SharedPtr< Aspose::Font::Glyphs::GlyphsStatistic > GlyphsStatistic
 To hold statistic about glyphs operations More...
 

Detailed Description

Type1 metric font implementation. This type1 font is created using metrics only. Glyphs retrieval functions and some other that require real font are not allowed, not allowed functions throw exception Type1NotSupportedException. Other properties (FontName, Weight, Metrics and Encoding) are used from metrics file.

Constructor & Destructor Documentation

◆ Type1MetricFont()

Aspose::Font::Type1::Type1MetricFont::Type1MetricFont ( System::SharedPtr< Aspose::Font::Sources::FontDefinition fontDefinition)
protected

Internal constructor. A factory should be used to create the font

Member Function Documentation

◆ get_Encoding()

ASPOSE_FONT_SHARED_API System::SharedPtr<IFontEncoding> Aspose::Font::Type1::Type1MetricFont::get_Encoding ( )
overridevirtual

Encoding is defined in metrics file. StandardAdobeEncoding: the encoding is populated automatically

Reimplemented from Aspose::Font::Type1::Type1Font.

◆ get_FontFamily()

ASPOSE_FONT_SHARED_API System::String Aspose::Font::Type1::Type1MetricFont::get_FontFamily ( )
overridevirtual

Gets Font family.

Reimplemented from Aspose::Font::Type1::Type1Font.

◆ get_FontName()

ASPOSE_FONT_SHARED_API System::String Aspose::Font::Type1::Type1MetricFont::get_FontName ( )
overridevirtual

Gets Font name.

Reimplemented from Aspose::Font::Type1::Type1Font.

◆ get_FontStyle()

ASPOSE_FONT_SHARED_API Aspose::Font::FontStyle Aspose::Font::Type1::Type1MetricFont::get_FontStyle ( )
overridevirtual

Gets Font style. This is a value computed and represented in generalized type.

Reimplemented from Aspose::Font::Type1::Type1Font.

◆ get_NumGlyphs()

ASPOSE_FONT_SHARED_API int32_t Aspose::Font::Type1::Type1MetricFont::get_NumGlyphs ( )
overridevirtual

Gets number of glyphs in the Font.

Reimplemented from Aspose::Font::Type1::Type1Font.

◆ get_Style()

ASPOSE_FONT_SHARED_API System::String Aspose::Font::Type1::Type1MetricFont::get_Style ( )
overridevirtual

Gets Font style.

Reimplemented from Aspose::Font::Type1::Type1Font.

◆ get_Type1FontDictionary()

ASPOSE_FONT_SHARED_API System::SharedPtr<Aspose::Font::Type1::Internals::Type1FontDictionary> Aspose::Font::Type1::Type1MetricFont::get_Type1FontDictionary ( )
overrideprotectedvirtual

Type1 file format dictionary "Type1FontDictionary"

Reimplemented from Aspose::Font::Type1::Type1Font.

◆ GetAllGlyphIds()

ASPOSE_FONT_SHARED_API System::ArrayPtr<System::SharedPtr<Aspose::Font::Glyphs::GlyphId> > Aspose::Font::Type1::Type1MetricFont::GetAllGlyphIds ( )
overridevirtual

Returns all glyph ids, available in the Font. Not supported for Type1MetricFont type.

Returns
All glyph identifiers, available in the Font.

Reimplemented from Aspose::Font::Type1::Type1Font.

◆ GetGlyphById() [1/2]

ASPOSE_FONT_SHARED_API System::SharedPtr<Aspose::Font::Glyphs::Glyph> Aspose::Font::Type1::Type1MetricFont::GetGlyphById ( System::String  id)
overridevirtual

Returns glyph by glyph id. Not supported for Type1MetricFont type.

Parameters
idGlyph identifier.
Returns
Glyph.

Reimplemented from Aspose::Font::Type1::Type1Font.

◆ GetGlyphById() [2/2]

ASPOSE_FONT_SHARED_API System::SharedPtr<Aspose::Font::Glyphs::Glyph> Aspose::Font::Type1::Type1MetricFont::GetGlyphById ( System::SharedPtr< Aspose::Font::Glyphs::GlyphId id)
override

Returns glyph by glyph id. Not supported for Type1MetricFont type.

Parameters
idGlyph identifier.
Returns
Glyph.

◆ MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION()

Aspose::Font::Type1::Type1MetricFont::MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION ( Type1MetricFont  ,
CODEPORTING_ARGS(System::SharedPtr< Aspose::Font::Sources::FontDefinition > fontDefinition)   
)
protected

◆ set_Type1FontDictionary()

ASPOSE_FONT_SHARED_API void Aspose::Font::Type1::Type1MetricFont::set_Type1FontDictionary ( System::SharedPtr< Aspose::Font::Type1::Internals::Type1FontDictionary >  value)
overrideprotectedvirtual

Type1 file format dictionary "Type1FontDictionary"

Reimplemented from Aspose::Font::Type1::Type1Font.