(incubating) | The Free and Open Productivity Suite

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous

Content for OpenOffice.org version 3.3.

:: com :: sun :: star :: awt ::

interface XFont
Description
decribes a font on a specific device.

All values are in pixels within this device.


Methods' Summary
getFontDescriptor returns the description of the font.  
getFontMetric returns additional information about the font.  
getCharWidth returns the width of the specified character.  
getCharWidths returns the widths of the specified characters.  
getStringWidth returns the string width.  
getStringWidthArray returns the string and the character widths.  
getKernPairs queries the kerning pair table.  
Methods' Details
getFontDescriptor
FontDescriptor
getFontDescriptor();

Description
returns the description of the font.

The unit of measurement is pixels for the device.

getFontMetric
SimpleFontMetric
getFontMetric();

Description
returns additional information about the font.
getCharWidth
short
getCharWidth( [in] char  c );

Description
returns the width of the specified character.
Returns
the character width measured in pixels for the device.
getCharWidths
sequence< short >
getCharWidths( [in] char  nFirst,
[in] char  nLast );

Description
returns the widths of the specified characters.
Returns
a sequence of the widths of subsequent characters for this font.
getStringWidth
long
getStringWidth( [in] string  str );

Description
returns the string width.
Returns
the width of the specified string of characters measured in pixels for the device.
getStringWidthArray
long
getStringWidthArray( [in] string  str,
[out] sequence< long >  aDXArray );

Description
returns the string and the character widths.
Returns
the width of the specified string of characters measured in pixels for the device.
Parameter aDXArray
receives the width of every single character measured in pixels for the device.
getKernPairs
void
getKernPairs( [out] sequence< char >  Chars1,
[out] sequence< char >  Chars2,
[out] sequence< short >  Kerns );

Description
queries the kerning pair table.
Top of Page

Apache OpenOffice is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Copyright & License
Apache and the Apache feather logos are trademarks of The Apache Software Foundation. OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.