Aspose::Cells::IFont Class Referenceabstract

Encapsulates the font object used in a spreadsheet. More...

Inherits Object.

Public Member Functions

virtual Aspose::Cells::Systems::Int32 GetCharset ()=0
 Represent the character get. More...
 
virtual void SetCharset (Aspose::Cells::Systems::Int32 value)=0
 Represent the character set. More...
 
virtual bool IsItalic ()=0
 Gets a value indicating whether the font is italic. More...
 
virtual void SetItalic (bool value)=0
 Sets a value indicating whether the font is italic. More...
 
virtual bool IsBold ()=0
 Gets a value indicating whether the font is bold. More...
 
virtual void SetBold (bool value)=0
 Sets a value indicating whether the font is bold. More...
 
virtual Aspose::Cells::TextCapsType GetCapsType ()=0
 Gets the text caps type. More...
 
virtual void SetCapsType (Aspose::Cells::TextCapsType value)=0
 Sets the text caps type. More...
 
virtual Aspose::Cells::TextStrikeType GetStrikeType ()=0
 Gets the strike type of the text. More...
 
virtual void SetStrikeType (Aspose::Cells::TextStrikeType value)=0
 Sets the strike type of the text. More...
 
virtual bool IsStrikeout ()=0
 Gets a value indicating whether the font is single strikeout. More...
 
virtual void SetStrikeout (bool value)=0
 Sets a value indicating whether the font is single strikeout. More...
 
virtual Aspose::Cells::Systems::Double GetScriptOffset ()=0
 Gets the script offset, in unit of percentage More...
 
virtual void SetScriptOffset (Aspose::Cells::Systems::Double value)=0
 Sets the script offset, in unit of percentage More...
 
virtual bool IsSuperscript ()=0
 Gets a value indicating whether the font is super script. More...
 
virtual void SetSuperscript (bool value)=0
 Sets a value indicating whether the font is super script. More...
 
virtual bool IsSubscript ()=0
 Gets a value indicating whether the font is subscript. More...
 
virtual void SetSubscript (bool value)=0
 Sets a value indicating whether the font is subscript. More...
 
virtual Aspose::Cells::FontUnderlineType GetUnderline ()=0
 Gets the font underline type. More...
 
virtual void SetUnderline (Aspose::Cells::FontUnderlineType value)=0
 Sets the font underline type. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > GetName ()=0
 Gets the name of the IFont More...
 
virtual void SetName (intrusive_ptr< Aspose::Cells::Systems::String > value)=0
 Sets the name of the Font More...
 
virtual Aspose::Cells::Systems::Double GetDoubleSize ()=0
 Gets the double size of the font. More...
 
virtual void SetDoubleSize (Aspose::Cells::Systems::Double value)=0
 Sets the double size of the font. More...
 
virtual Aspose::Cells::Systems::Int32 GetSize ()=0
 Gets the size of the font. More...
 
virtual void SetSize (Aspose::Cells::Systems::Int32 value)=0
 Sets the size of the font. More...
 
virtual intrusive_ptr< Aspose::Cells::IThemeColorGetIThemeColor ()=0
 Gets the theme color. More...
 
virtual void SetIThemeColor (intrusive_ptr< Aspose::Cells::IThemeColor > value)=0
 Sets the theme color. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::Drawing::Color > GetColor ()=0
 Gets or sets the System.Drawing.Color of the font. More...
 
virtual void SetColor (intrusive_ptr< Aspose::Cells::Systems::Drawing::Color > value)=0
 Sets the System.Drawing.Color of the font. More...
 
virtual Aspose::Cells::Systems::Int32 GetArgbColor ()=0
 Gets the color with a 32-bit ARGB value. More...
 
virtual void SetArgbColor (Aspose::Cells::Systems::Int32 value)=0
 Sets the color with a 32-bit ARGB value. More...
 
virtual bool Equals (intrusive_ptr< Aspose::Cells::IFont > font)=0
 Checks if two fonts are equals. More...
 
virtual bool IsNormalizeHeights ()=0
 Indicates whether the normalization of height that is to be applied to the text run. More...
 
virtual void SetNormalizeHeights (bool value)=0
 Indicates whether the normalization of height that is to be applied to the text run. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::String > ToString ()=0
 Returns a string represents the current Cell object. More...
 

Detailed Description

Encapsulates the font object used in a spreadsheet.

[C++]
//Instantiating a Workbook object
intrusive_ptr<IWorkbook> workbook = Factory::CreateIWorkbook();
//Obtaining the reference of the newly added worksheet by passing its sheet index
intrusive_ptr<IWorksheet> worksheet = workbook->GetIWorksheets()->GetObjectByIndex(0);
//Accessing the "A1" cell from the worksheet
intrusive_ptr<ICell> cell = worksheet->GetICells()->GetObjectByIndex(new String("A1"));
//Adding some value to the "A1" cell
cell->PutValue((StringPtr)new String("Hello Aspose!"));
intrusive_ptr<IFont> font = cell->GetIStyle()->GetIFont();
//Setting the font name to "Times New Roman"
font->SetName(new String("Times New Roman"));
//Setting font size to 14
font->SetSize(14);
//setting font color as Red
font->SetColor(Color::GetRed());
<br>//Saving the Excel file
workbook->Save(new String("d:\\dest.xls"));

Member Function Documentation

◆ Equals()

virtual bool Aspose::Cells::IFont::Equals ( intrusive_ptr< Aspose::Cells::IFont font)
pure virtual

Checks if two fonts are equals.

Parameters
fontCompared font object.
Returns
True if equal to the compared font object.

◆ GetArgbColor()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IFont::GetArgbColor ( )
pure virtual

Gets the color with a 32-bit ARGB value.

◆ GetCapsType()

virtual Aspose::Cells::TextCapsType Aspose::Cells::IFont::GetCapsType ( )
pure virtual

Gets the text caps type.

◆ GetCharset()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IFont::GetCharset ( )
pure virtual

Represent the character get.

◆ GetColor()

virtual intrusive_ptr<Aspose::Cells::Systems::Drawing::Color> Aspose::Cells::IFont::GetColor ( )
pure virtual

Gets or sets the System.Drawing.Color of the font.

◆ GetDoubleSize()

virtual Aspose::Cells::Systems::Double Aspose::Cells::IFont::GetDoubleSize ( )
pure virtual

Gets the double size of the font.

◆ GetIThemeColor()

virtual intrusive_ptr<Aspose::Cells::IThemeColor> Aspose::Cells::IFont::GetIThemeColor ( )
pure virtual

Gets the theme color.

If the font color is not a theme color, NULL will be returned.

◆ GetName()

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IFont::GetName ( )
pure virtual

Gets the name of the IFont

[C++]
intrusive_ptr<IStyle> style;
..........
intrusive_ptr<IFont> font = style->GetIFont();
font->SetName(new String("Times New Roman"));

◆ GetScriptOffset()

virtual Aspose::Cells::Systems::Double Aspose::Cells::IFont::GetScriptOffset ( )
pure virtual

Gets the script offset, in unit of percentage

◆ GetSize()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IFont::GetSize ( )
pure virtual

Gets the size of the font.

◆ GetStrikeType()

virtual Aspose::Cells::TextStrikeType Aspose::Cells::IFont::GetStrikeType ( )
pure virtual

Gets the strike type of the text.

◆ GetUnderline()

virtual Aspose::Cells::FontUnderlineType Aspose::Cells::IFont::GetUnderline ( )
pure virtual

Gets the font underline type.

◆ IsBold()

virtual bool Aspose::Cells::IFont::IsBold ( )
pure virtual

Gets a value indicating whether the font is bold.

◆ IsItalic()

virtual bool Aspose::Cells::IFont::IsItalic ( )
pure virtual

Gets a value indicating whether the font is italic.

◆ IsNormalizeHeights()

virtual bool Aspose::Cells::IFont::IsNormalizeHeights ( )
pure virtual

Indicates whether the normalization of height that is to be applied to the text run.

◆ IsStrikeout()

virtual bool Aspose::Cells::IFont::IsStrikeout ( )
pure virtual

Gets a value indicating whether the font is single strikeout.

◆ IsSubscript()

virtual bool Aspose::Cells::IFont::IsSubscript ( )
pure virtual

Gets a value indicating whether the font is subscript.

◆ IsSuperscript()

virtual bool Aspose::Cells::IFont::IsSuperscript ( )
pure virtual

Gets a value indicating whether the font is super script.

◆ SetArgbColor()

virtual void Aspose::Cells::IFont::SetArgbColor ( Aspose::Cells::Systems::Int32  value)
pure virtual

Sets the color with a 32-bit ARGB value.

◆ SetBold()

virtual void Aspose::Cells::IFont::SetBold ( bool  value)
pure virtual

Sets a value indicating whether the font is bold.

◆ SetCapsType()

virtual void Aspose::Cells::IFont::SetCapsType ( Aspose::Cells::TextCapsType  value)
pure virtual

Sets the text caps type.

◆ SetCharset()

virtual void Aspose::Cells::IFont::SetCharset ( Aspose::Cells::Systems::Int32  value)
pure virtual

Represent the character set.

◆ SetColor()

virtual void Aspose::Cells::IFont::SetColor ( intrusive_ptr< Aspose::Cells::Systems::Drawing::Color >  value)
pure virtual

Sets the System.Drawing.Color of the font.

◆ SetDoubleSize()

virtual void Aspose::Cells::IFont::SetDoubleSize ( Aspose::Cells::Systems::Double  value)
pure virtual

Sets the double size of the font.

◆ SetItalic()

virtual void Aspose::Cells::IFont::SetItalic ( bool  value)
pure virtual

Sets a value indicating whether the font is italic.

◆ SetIThemeColor()

virtual void Aspose::Cells::IFont::SetIThemeColor ( intrusive_ptr< Aspose::Cells::IThemeColor value)
pure virtual

Sets the theme color.

If the font color is not a theme color, NULL will be returned.

◆ SetName()

virtual void Aspose::Cells::IFont::SetName ( intrusive_ptr< Aspose::Cells::Systems::String >  value)
pure virtual

Sets the name of the Font

[C++]
intrusive_ptr<IStyle> style;
..........
intrusive_ptr<IFont> font = style->GetIFont();
font->SetName(new String("Times New Roman"));

◆ SetNormalizeHeights()

virtual void Aspose::Cells::IFont::SetNormalizeHeights ( bool  value)
pure virtual

Indicates whether the normalization of height that is to be applied to the text run.

◆ SetScriptOffset()

virtual void Aspose::Cells::IFont::SetScriptOffset ( Aspose::Cells::Systems::Double  value)
pure virtual

Sets the script offset, in unit of percentage

◆ SetSize()

virtual void Aspose::Cells::IFont::SetSize ( Aspose::Cells::Systems::Int32  value)
pure virtual

Sets the size of the font.

◆ SetStrikeout()

virtual void Aspose::Cells::IFont::SetStrikeout ( bool  value)
pure virtual

Sets a value indicating whether the font is single strikeout.

◆ SetStrikeType()

virtual void Aspose::Cells::IFont::SetStrikeType ( Aspose::Cells::TextStrikeType  value)
pure virtual

Sets the strike type of the text.

◆ SetSubscript()

virtual void Aspose::Cells::IFont::SetSubscript ( bool  value)
pure virtual

Sets a value indicating whether the font is subscript.

◆ SetSuperscript()

virtual void Aspose::Cells::IFont::SetSuperscript ( bool  value)
pure virtual

Sets a value indicating whether the font is super script.

◆ SetUnderline()

virtual void Aspose::Cells::IFont::SetUnderline ( Aspose::Cells::FontUnderlineType  value)
pure virtual

Sets the font underline type.

◆ ToString()

virtual intrusive_ptr<Aspose::Cells::Systems::String> Aspose::Cells::IFont::ToString ( )
pure virtual

Returns a string represents the current Cell object.

Returns