Difference between revisions of "Documentation/DevGuide/GUI/Font-specific Properties"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Initial author Sun Microsystems, Inc.)
m (1 revision(s))
(No difference)

Revision as of 12:53, 15 February 2008

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.


float. Specifies the character width.


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.


string. Specifies the exact name of the font.


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.


short. Specifies the height of the font in the measure of the destination.


short. Specifies the width of the font in the measure of the destination.


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.


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


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 .


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.


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


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


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.



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


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


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