1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_awt_XFont_idl__ 28#define __com_sun_star_awt_XFont_idl__ 29 30#ifndef __com_sun_star_uno_XInterface_idl__ 31#include <com/sun/star/uno/XInterface.idl> 32#endif 33 34#ifndef __com_sun_star_awt_FontDescriptor_idl__ 35#include <com/sun/star/awt/FontDescriptor.idl> 36#endif 37 38#ifndef __com_sun_star_awt_SimpleFontMetric_idl__ 39#include <com/sun/star/awt/SimpleFontMetric.idl> 40#endif 41 42 43//============================================================================= 44 45 module com { module sun { module star { module awt { 46 47//============================================================================= 48 49/** decribes a font on a specific device. 50 51 <p>All values are in pixels within this device.</p> 52 */ 53published interface XFont: com::sun::star::uno::XInterface 54{ 55 //------------------------------------------------------------------------- 56 57 /** returns the description of the font. 58 59 <p>The unit of measurement is pixels for the device. 60 */ 61 com::sun::star::awt::FontDescriptor getFontDescriptor(); 62 63 //------------------------------------------------------------------------- 64 65 /** returns additional information about the font. 66 */ 67 com::sun::star::awt::SimpleFontMetric getFontMetric(); 68 69 //------------------------------------------------------------------------- 70 71 /** returns the width of the specified character. 72 73 @returns 74 the character width measured in pixels for the device. 75 */ 76 short getCharWidth( [in] char c ); 77 78 //------------------------------------------------------------------------- 79 80 /** returns the widths of the specified characters. 81 82 @returns 83 a sequence of the widths of subsequent characters for this font. 84 */ 85 sequence<short> getCharWidths( [in] char nFirst, [in] char nLast ); 86 87 //------------------------------------------------------------------------- 88 89 /** returns the string width. 90 91 @returns 92 the width of the specified string of characters 93 measured in pixels for the device. 94 */ 95 long getStringWidth( [in] string str ); 96 97 //------------------------------------------------------------------------- 98 99 /** returns the string and the character widths. 100 101 @returns 102 the width of the specified string of characters 103 measured in pixels for the device. 104 105 @param aDXArray 106 receives the width of every single character 107 measured in pixels for the device. 108 */ 109 long getStringWidthArray( [in] string str, 110 [out] sequence<long> aDXArray ); 111 112 //------------------------------------------------------------------------- 113 114 /** queries the kerning pair table. 115 */ 116 void getKernPairs( [out] sequence<char> Chars1, 117 [out] sequence<char> Chars2, 118 [out] sequence<short> Kerns ); 119 120}; 121 122//============================================================================= 123 124}; }; }; }; 125 126#endif 127