Font-specific Properties

From Apache OpenOffice Wiki
Jump to: navigation, search



The following properties are available on all controls with descriptive texts such as text fields, command buttons, radio buttons and check boxes. They are in all respective service specifications of these controls (it is the model's service description). When you are working with font properties, http://www.openoffice.org/issues/show_bug.cgi?id=71482 must be considered.

Properties referring to Font Attributes
[FontDescriptor] The property FontDescriptor applies to the structure com.sun.star.awt.FontDescriptor, where all available characteristics of the font may be set.
[FontEmphasisMark] Determines the type and position of an emphasis mark in Asian texts. It can accept any of the values in FontEmphasisMark.
[FontRelief] The FontRelief property accepts three values: (com.sun.star.text.FontRelief.) NONE (default), EMBOSSED or ENGRAVED. The embossed relief makes the characters appear as if they are raised above the page. The engraved relief makes the characters appear as if they are pressed into the page.
[FontCharWidth]

([com.sun.star.awt.FontDescriptor.CharacterWidth])

float. Specifies the character width.
[FontCharset]

([com.sun.star.awt.FontDescriptor.CharSet])

short. Specifies the character set which is supported by the font. It can be any of the constants defined in com.sun.star.awt.CharSet.
[FontName]

([com.sun.star.awt.FontDescriptor.Name])

string. Specifies the exact name of the font.
[FontFamily]

([com.sun.star.awt.FontDescriptor.Family])

Specifies the family style of a font and can accept values from the constants group com.sun.star.awt.FontFamily. This defines the group of typefaces with similar characteristics. Recognized families are Roman, Swiss, Modern, Script, and Decorative. For example, "Arial", "Arial Bold", "Arial Bold Italic", "Arial Italic", Small Fonts, and MS Sans Serif are all part of the sans serif Swiss font family.
[FontHeight]

([com.sun.star.awt.FontDescriptor.Height])

short. Specifies the height of the font in the measure of the destination.
[FontWidth]

([com.sun.star.awt.FontDescriptor.Width])

short. Specifies the width of the font in the measure of the destination.
[FontKerning]

([com.sun.star.awt.FontDescriptor.Kerning])

boolean. Font kerning defines the process of adjusting letter spacing in a proportional font. The value of the property indicates if there is a kerning table available for the font. The kerning table contains the values that control the intercharacter spacing for the glyphs in a font.
[FontOrientation]

([com.sun.star.awt.FontDescriptor.Orientation])

short. Specifies the rotation of the font in degrees where 0 is the baseline.
[FontPitch]

([com.sun.star.awt.FontDescriptor.Pitch])

short. The font pitch defines whether the width of a character of a font is fixed (as in monospaced fonts) or variable. It may accept one of the values defined in the constants group com.sun.star.awt.FontPitch .
[FontSlant]

([com.sun.star.awt.FontDescriptor.Slant])

Specifies how slanted the characters should be. It can be any value of the enumeration com.sun.star.awt.FontSlant, denoting (reverse) italic or (reverse) oblique or none slants.
[FontStrikeout]

([com.sun.star.awt.FontDescriptor.Strikeout])

Specifies the strikeout style of the text as defined by the constants group com.sun.star.awt.FontStrikeout.
[FontStyleName]

([com.sun.star.awt.FontDescriptor.StyleName])

string. Indicates the individual style of a font. For example "Bold", "Bold Italic" and "Italic" are defined styles of the font "Arial".
[FontType]

([com.sun.star.awt.FontDescriptor.Type])

short. Specifies the technology of the font representation as defined by the constants group com.sun.star.awt.FontType. These constants either indicate if a font is a raster font.

A scalable font (or "vector font" or "outline font") is one defined as vector graphics, i.e. as a set of lines and curves to define the border of glyphs, as opposed to a bitmap font, which defines each glyph as an array of pixels.

A device font is a font that is only presentable on a special device like a printer. OpenOffice may use device independent metrics to display these fonts.

[FontUnderline]

([com.sun.star.awt.FontDescriptor.Underline])

Specifies the underlining style of the text as defined by the constants group com.sun.star.awt.FontUnderline.
[FontWeight]

([com.sun.star.awt.FontDescriptor.Weight])

float. Specifies the thickness of the font lines as a percentage relative to the inherited font weight.
[FontWordLineMode]

([com.sun.star.awt.FontDescriptor.WordLineMode])

boolean. Specifies if only words get underlined. True means that only non-space characters get underlined, false means that the spacing also gets underlined. This property is only valid if the property com/sun/star/awt/FontDescriptor/UnderLine is not FontUnderline.NONE.

Font properties may either be set as single properties or as a whole by means of the font descriptor which is useful when you want to assign the same properties to multiple objects.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools