|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Boxed
org.gnu.pango.FontDescription
The FontDescription represents the description of an ideal font. This is used both to list what fonts are available on the system and also for specifying the characteristics of a font to load.
Field Summary |
Fields inherited from class org.gnu.glib.Boxed |
handle |
Constructor Summary | |
FontDescription()
Create a new FontDescription. |
|
FontDescription(FontDescription fd)
Create a new FontDescription that is a copy of the provided FontDescription. |
|
FontDescription(Handle handle)
Create a new FontDescription using a handle from native methods. |
|
FontDescription(java.lang.String str)
Create a new FontDescription from a string in the form "[FAMILY-LIST][STYLE-OPTIONS][SIZE]" where FAMILY-LIST is a comma separated list of families optionally terminated by a comma, STYLE-OPTIONS is a whitespace separated list of words where each WORD describes one of style, varient, weight, or stretch and SIZE is a decimal number (size in points). |
Method Summary | |
boolean |
betterMatch(FontDescription oldMatch,
FontDescription newMatch)
Determines if the style attributes of newMatch are a closer match for this FontDescription than oldMatch, or if oldMatch is null, determines if newMatch is a match at all. |
boolean |
equal(FontDescription fd)
Compares two FontDescriptions for equality. |
protected void |
finalize()
|
java.lang.String |
getFamily()
Gets the family name field of a font description. |
FontMask |
getSetFields()
Determines which fields in a font description have been set. |
int |
getSize()
Gets the size field of a font description. |
Stretch |
getStretch()
Gets the stretch field of a font description. |
Style |
getStyle()
Gets the style field of a PangoFontDescription. |
Variant |
getVariant()
Gets the variant field of the description |
Weight |
getWeight()
Gets the weight field of a font description. |
int |
hash()
Create a hash of this object. |
protected static boolean |
pango_font_description_better_match(Handle desc,
Handle oldMatch,
Handle newMatch)
|
protected static Handle |
pango_font_description_copy(Handle desc)
|
protected static boolean |
pango_font_description_equal(Handle desc1,
Handle desc2)
|
protected static void |
pango_font_description_free(Handle desc)
|
protected static Handle |
pango_font_description_from_string(java.lang.String str)
|
protected static java.lang.String |
pango_font_description_get_family(Handle desc)
|
protected static int |
pango_font_description_get_set_fields(Handle desc)
|
protected static int |
pango_font_description_get_size(Handle desc)
|
protected static int |
pango_font_description_get_stretch(Handle desc)
|
protected static int |
pango_font_description_get_style(Handle desc)
|
protected static int |
pango_font_description_get_type()
|
protected static int |
pango_font_description_get_variant(Handle desc)
|
protected static int |
pango_font_description_get_weight(Handle desc)
|
protected static int |
pango_font_description_hash(Handle desc)
|
protected static void |
pango_font_description_merge(Handle desc,
Handle descToMerge,
boolean replaceExisting)
|
protected static Handle |
pango_font_description_new()
|
protected static void |
pango_font_description_set_family(Handle desc,
java.lang.String family)
|
protected static void |
pango_font_description_set_size(Handle desc,
int size)
|
protected static void |
pango_font_description_set_stretch(Handle desc,
int stretch)
|
protected static void |
pango_font_description_set_style(Handle desc,
int style)
|
protected static void |
pango_font_description_set_variant(Handle desc,
int variant)
|
protected static void |
pango_font_description_set_weight(Handle desc,
int weight)
|
protected static java.lang.String |
pango_font_description_to_filename(Handle desc)
|
protected static java.lang.String |
pango_font_description_to_string(Handle desc)
|
protected static void |
pango_font_description_unset_fields(Handle desc,
int toUnset)
|
void |
replace(FontDescription descToMerge,
boolean replaceExisting)
Merges the fields that are set in desc_to_merge into the fields in desc. |
void |
setFamily(java.lang.String family)
Sets the family name field of a font description. |
void |
setSize(int size)
Sets the size field of a font description. |
void |
setStretch(Stretch stretch)
Sets the stretch field of a font description. |
void |
setStyle(Style style)
Sets the style field of a PangoFontDescription. |
void |
setVariant(Variant var)
Sets the variant field of a font description. |
void |
setWeight(Weight weight)
Sets the weight field of a font description. |
java.lang.String |
toFilename()
Creates a filename representation of a font description. |
java.lang.String |
toString()
Creates a string representation of a font description. |
void |
unsetFields(FontMask mask)
Unset some of the fields in this FontDescription. |
Methods inherited from class org.gnu.glib.Boxed |
equals, getHandle, hashCode, setHandle |
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public FontDescription(Handle handle)
public FontDescription()
public FontDescription(java.lang.String str)
str
- The string representation for the font description.public FontDescription(FontDescription fd)
fd
- Method Detail |
public void setFamily(java.lang.String family)
public java.lang.String getFamily()
public void setStyle(Style style)
public Style getStyle()
public void setVariant(Variant var)
public Variant getVariant()
public void setWeight(Weight weight)
public Weight getWeight()
public void setStretch(Stretch stretch)
public Stretch getStretch()
public void setSize(int size)
public int getSize()
public FontMask getSetFields()
public void replace(FontDescription descToMerge, boolean replaceExisting)
public java.lang.String toString()
public int hash()
public boolean equal(FontDescription fd)
fd
-
public void unsetFields(FontMask mask)
mask
- public boolean betterMatch(FontDescription oldMatch, FontDescription newMatch)
oldMatch
- newMatch
- public java.lang.String toFilename()
protected void finalize() throws java.lang.Throwable
java.lang.Throwable
protected static final int pango_font_description_get_type()
protected static final Handle pango_font_description_new()
protected static final Handle pango_font_description_copy(Handle desc)
protected static final int pango_font_description_hash(Handle desc)
protected static final boolean pango_font_description_equal(Handle desc1, Handle desc2)
protected static final void pango_font_description_free(Handle desc)
protected static final void pango_font_description_set_family(Handle desc, java.lang.String family)
protected static final java.lang.String pango_font_description_get_family(Handle desc)
protected static final void pango_font_description_set_style(Handle desc, int style)
protected static final int pango_font_description_get_style(Handle desc)
protected static final void pango_font_description_set_variant(Handle desc, int variant)
protected static final int pango_font_description_get_variant(Handle desc)
protected static final void pango_font_description_set_weight(Handle desc, int weight)
protected static final int pango_font_description_get_weight(Handle desc)
protected static final void pango_font_description_set_stretch(Handle desc, int stretch)
protected static final int pango_font_description_get_stretch(Handle desc)
protected static final void pango_font_description_set_size(Handle desc, int size)
protected static final int pango_font_description_get_size(Handle desc)
protected static final int pango_font_description_get_set_fields(Handle desc)
protected static final void pango_font_description_unset_fields(Handle desc, int toUnset)
protected static final void pango_font_description_merge(Handle desc, Handle descToMerge, boolean replaceExisting)
protected static final boolean pango_font_description_better_match(Handle desc, Handle oldMatch, Handle newMatch)
protected static final Handle pango_font_description_from_string(java.lang.String str)
protected static final java.lang.String pango_font_description_to_string(Handle desc)
protected static final java.lang.String pango_font_description_to_filename(Handle desc)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |