com.mapinfo.midev.style

## Interface IFont

All Superinterfaces:
  Serializable

    public interface IFont
    extends Serializable

Contains styling properties used for drawing font symbols or text labels.

### Nested Class Summary

Nested Classes
`static class` `IFont.FontFaceStyle` Controls whether the text is to be rendered using a normal, italic, or oblique face.
`static class` `IFont.FontWeight` Controls the weight or boldness of the font.
`static class` `IFont.TextCase` Controls whether the text is to be rendered in capital letters.
`static class` `IFont.TextDecoration` Controls decoration effects that are to be added to the font.
`static class` `IFont.TextEffect` Controls whether the text is to be rendered using any effects like halo, box or glyph_outline .

### Method Summary

All Methods Instance Methods Abstract Methods
`IFont` `getCopy()` Returns a copy of this IFont.
`Number` `getEffectOpacity()` Returns the effect opacity, which controls how the effect will be composed with the underlying paint.
`Object` `getEffectPaint()` Returns the effect style of the font.
`String` `getFamily()` Returns the name of the font family.
`IFont.FontFaceStyle` `getFontFaceStyle()` Returns the face style of the font.
`IFont.FontWeight` `getFontWeight()` Returns the weight of the font.
`Number` `getOpacity()` Returns the opacity, which controls how the stroke will be composed with the underlying paint.
`Object` `getPaint()` Returns the paint/color of the font.
`PaperLength` `getSize()` Returns the size of the font.
`IFont.TextCase` `getTextCase()` Returns the text case of the font.
`IFont.TextDecoration` `getTextDecoration()` Returns the decoration of the font.
`IFont.TextEffect` `getTextEffect()` Returns the effect of the font.
`Boolean` `hasShadow()` Returns `true` if the font is to be rendered with shadow.
`Boolean` `isExpanded()` Returns `true` if the font is expanded.
`void` `setEffectOpacity(Number effectOpacity)` Sets the opacity of the glyph line, which controls how the glyph of font will be composed with the underlying paint.
`void` `setEffectPaint(Color effect)` Sets the effect color of the font.
`void` `setEffectPaint(IPaint effect)` Sets the effect style of the font with a IPaint object.
`void` `setExpanded(Boolean expanded)` Sets the stretch of the font.
`void` `setFamily(String family)` Sets the name of the font family.
`void` `setFontFaceStyle(IFont.FontFaceStyle fontFaceStyle)` Sets the face style of the font.
`void` `setFontWeight(IFont.FontWeight fontWeight)` Sets the weight of the font, which controls the boldness of the font.
`void` `setOpacity(Number opacity)` Sets the opacity of the glyph line, which controls how the stroke of font will be composed with the underlying paint.
`void` `setPaint(Color color)` Sets the paint of the font.
`void` `setPaint(IPaint color)` Sets the paint of the font with a IPaint object.
`void` `setShadow(Boolean shadow)` Sets whether the font is to be rendered with shadow.
`void` `setSize(PaperLength size)` Sets the size of the font.
`void` `setTextCase(IFont.TextCase textCase)` Sets the text case of the font.
`void` `setTextDecoration(IFont.TextDecoration textDecoration)` Sets the decoration of the font.
`void` `setTextEffect(IFont.TextEffect textEffect)` Sets the effect of the font.

### Method Detail

#### isExpanded

    Boolean isExpanded()

Returns `true` if the font is expanded. When the font is expanded, it will be wider than the regular width of the font.

Returns:
  the expanded.

#### setExpanded

    void setExpanded(Boolean expanded)

Sets the stretch of the font. When the font is expanded, it will be wider than the regular width of the font.

Parameters:
  `expanded` - set to `true` to render the font wider.

#### getFamily

    String getFamily()

Returns the name of the font family.

Returns:
  the name of the font family.

#### setFamily

    void setFamily(String family)

Sets the name of the font family.

If the family name is not found, the default font is used. The name should not be the full font name or specify other attributes (such as the name "Helvetica Bold"). Such names might result in the default font if the name does not match a known family name.

Parameters:
  `family` - the name of the font family.

#### getFontFaceStyle

    IFont.FontFaceStyle getFontFaceStyle()

Returns the face style of the font.

Returns:
  the font face style.
See Also:
  `IFont.FontFaceStyle`

#### setFontFaceStyle

    void setFontFaceStyle(IFont.FontFaceStyle fontFaceStyle)

Sets the face style of the font.

Parameters:
  `fontFaceStyle` - the font face style of the font.

#### getFontWeight

    IFont.FontWeight getFontWeight()

Returns the weight of the font.

Returns:
  the font weight.
See Also:
  `IFont.FontWeight`

#### setFontWeight

    void setFontWeight(IFont.FontWeight fontWeight)

Sets the weight of the font, which controls the boldness of the font.

Parameters:
  `fontWeight` - the font weight of the font.

#### hasShadow

    Boolean hasShadow()

Returns `true` if the font is to be rendered with shadow.

Returns:
  the shadow.

#### setShadow

    void setShadow(Boolean shadow)

Sets whether the font is to be rendered with shadow.

Parameters:
  `shadow` - the shadow of the font.

#### getSize

    PaperLength getSize()

Returns the size of the font. The size should be a positive number based on the font family.

Returns:
  the size of the font.

#### setSize

    void setSize(PaperLength size)

Sets the size of the font. The size should be a positive number based on the font family.

Parameters:
  `size` - the size of the font.

#### getPaint

    Object getPaint()

Returns the paint/color of the font. It can be either a com.mapinfo.style.IPaint object or a java.awt.Color object.

Returns:
  the paint/color.
See Also:
  `IPaint`

#### setPaint

    void setPaint(Color color)

Sets the paint of the font.

Parameters:
  `color` - the color of the font.

#### setPaint

    void setPaint(IPaint color)

Sets the paint of the font with a IPaint object.

Parameters:
  `color` - the paint of the font.

#### getOpacity

    Number getOpacity()

Returns the opacity, which controls how the stroke will be composed with the underlying paint. Valid range for opacity value is between 0.0 (fully transparent) and 1.0 (fully opaque).

Returns:
  the opacity.

#### setOpacity

    void setOpacity(Number opacity)

Sets the opacity of the glyph line, which controls how the stroke of font will be composed with the underlying paint. Valid range for opacity value is between 0.0 (fully transparent) and 1.0 (fully opaque). If opacity is set to a value outside this range, the renderer will clamp all negative values to 0.0, and values greater than 1.0 to 1.0.

Parameters:
  `opacity` - the opacity of the font.

#### getTextCase

    IFont.TextCase getTextCase()

Returns the text case of the font.

Returns:
  the text case.

#### setTextCase

    void setTextCase(IFont.TextCase textCase)

Sets the text case of the font.

Parameters:
  `textCase` - the text case of the font.

#### getTextDecoration

    IFont.TextDecoration getTextDecoration()

Returns the decoration of the font.

Returns:
  the text decoration.

#### setTextDecoration

    void setTextDecoration(IFont.TextDecoration textDecoration)

Sets the decoration of the font.

Parameters:
  `textDecoration` - the decoration of the font.

#### getCopy

    IFont getCopy()

Returns a copy of this IFont.

Returns:
  a copy of this IFont.

#### getTextEffect

    IFont.TextEffect getTextEffect()

Returns the effect of the font.

Returns:
  the text effect.

#### setTextEffect

    void setTextEffect(IFont.TextEffect textEffect)

Sets the effect of the font.

Parameters:
  `textEffect` - the effect of the font.

#### getEffectOpacity

    Number getEffectOpacity()

Returns the effect opacity, which controls how the effect will be composed with the underlying paint. Valid range for opacity value is between 0.0 (fully transparent) and 1.0 (fully opaque).

Returns:
  the effect opacity.

#### setEffectOpacity

    void setEffectOpacity(Number effectOpacity)

Sets the opacity of the glyph line, which controls how the glyph of font will be composed with the underlying paint. Valid range for opacity value is between 0.0 (fully transparent) and 1.0 (fully opaque).

Parameters:
  `effectOpacity` - the effect opacity of the font.

#### setEffectPaint

    void setEffectPaint(Color effect)

Sets the effect color of the font.

Parameters:
  `effect` - the effect of the font.

#### setEffectPaint

    void setEffectPaint(IPaint effect)

Sets the effect style of the font with a IPaint object.

Parameters:
  `effect` - the effect of the font.

#### getEffectPaint

    Object getEffectPaint()

Returns the effect style of the font. It can be either a com.mapinfo.style.IPaint object or a java.awt.Color object.

Returns:
  the effect.
See Also:
  `IPaint`