public final class FontFamily extends Object implements com.aspose.ms.System.IDisposable
Defines a group of type faces having a similar basic design and certain variations in styles. This class cannot be inherited.
| Constructor and Description |
|---|
FontFamily(String name)
Initializes a new instance of the
FontFamily class with the specified name. |
FontFamily(String name,
FontCollection fontCollection)
Initializes a new instance of the
FontFamily class. |
FontFamily(String name,
FontFamilyDefinition definition)
Initializes a new instance of the
FontFamily class. |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Releases all resources used by this
FontFamily. |
boolean |
equals(Object obj)
Indicates whether the specified object is a
FontFamily and is identical to this FontFamily. |
int |
getCellAscent(int style)
Returns the cell ascent, in design units, of the
FontFamily of the specified style. |
int |
getCellDescent(int style)
Returns the cell descent, in design units, of the
FontFamily of the specified style. |
int |
getEmHeight(int style)
Gets the height, in font design units, of the EM square for the specified style.
|
static FontFamily[] |
getFamilies()
Gets an array that contains all the
FontFamily objects associated with the current graphics context. |
static FontFamily |
getGenericMonospace()
Gets a generic monospace
FontFamily. |
static FontFamily |
getGenericSansSerif()
Gets a generic sans serif
FontFamily object. |
static FontFamily |
getGenericSerif()
Gets a generic serif
FontFamily. |
int |
getLineSpacing(int style)
Returns the line spacing, in design units, of the
FontFamily of the specified style. |
String |
getName()
Gets the name of this
FontFamily. |
String |
getName(int language)
Returns the name, in the specified language, of this
FontFamily. |
int |
hashCode()
Gets a hash code for this
FontFamily. |
boolean |
isStyleAvailable(int style)
Indicates whether the specified
FontStyle enumeration is available. |
public FontFamily(String name)
Initializes a new instance of the FontFamily class with the specified name.
name - The name of the new FontFamily.public FontFamily(String name, FontCollection fontCollection)
Initializes a new instance of the FontFamily class.
name - The name of the font family.fontCollection - The font collection.public FontFamily(String name, FontFamilyDefinition definition)
Initializes a new instance of the FontFamily class.
name - The name of the font family.definition - The definition.public static FontFamily[] getFamilies()
Gets an array that contains all the FontFamily objects associated with the current graphics context.
FontFamily objects associated with the current graphics context.public static FontFamily getGenericSansSerif()
Gets a generic sans serif FontFamily object.
FontFamily object that represents a generic sans serif font.public static FontFamily getGenericSerif()
Gets a generic serif FontFamily.
FontFamily that represents a generic serif font.public static FontFamily getGenericMonospace()
Gets a generic monospace FontFamily.
FontFamily that represents a generic monospace font.public String getName()
Gets the name of this FontFamily.
String that represents the name of this FontFamily.public void dispose()
Releases all resources used by this FontFamily.
dispose in interface com.aspose.ms.System.IDisposablepublic String getName(int language)
Returns the name, in the specified language, of this FontFamily.
language - The language in which the name is returned.String that represents the name, in the specified language,
of this FontFamily.public boolean isStyleAvailable(int style)
Indicates whether the specified FontStyle enumeration is available.
public int getEmHeight(int style)
Gets the height, in font design units, of the EM square for the specified style.
style - The FontStyle for which to get the EM height.public int getCellAscent(int style)
Returns the cell ascent, in design units, of the FontFamily of the specified style.
style - A FontStyle that contains style information for the font.FontFamily that uses the specified FontStyle.public int getCellDescent(int style)
Returns the cell descent, in design units, of the FontFamily of the specified style.
style - A FontStyle that contains style information for the font.FontFamily that uses
the specified FontStyle.public int hashCode()
Gets a hash code for this FontFamily.
hashCode in class ObjectFontFamily.public boolean equals(Object obj)
Indicates whether the specified object is a FontFamily and is identical to this FontFamily.
equals in class Objectobj - The object to test.true if obj is a FontFamily and is identical to this FontFamily; otherwise, false.public int getLineSpacing(int style)
Returns the line spacing, in design units, of the FontFamily of the specified style.
The line spacing is the vertical distance between the base lines of two consecutive lines of text.
style - The FontStyle to apply.Copyright (c) 2008-2025 Aspose Pty Ltd. All Rights Reserved.