1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
27 #ifndef __com_sun_star_rendering_XCanvasFont_idl__
28 #define __com_sun_star_rendering_XCanvasFont_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include
<com
/sun
/star
/uno
/XInterface.idl
>
33 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
34 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
36 #ifndef __com_sun_star_geometry_RealRectangle2D_idl__
37 #include
<com
/sun
/star
/geometry
/RealRectangle2D.idl
>
39 #ifndef __com_sun_star_rendering_FontRequest_idl__
40 #include
<com
/sun
/star
/rendering
/FontRequest.idl
>
42 #ifndef __com_sun_star_rendering_FontMetrics_idl__
43 #include
<com
/sun
/star
/rendering
/FontMetrics.idl
>
45 #ifndef __com_sun_star_rendering_RenderState_idl__
46 #include
<com
/sun
/star
/rendering
/RenderState.idl
>
48 #ifndef __com_sun_star_rendering_ViewState_idl__
49 #include
<com
/sun
/star
/rendering
/ViewState.idl
>
51 #ifndef __com_sun_star_rendering_StringContext_idl__
52 #include
<com
/sun
/star
/rendering
/StringContext.idl
>
55 #ifndef __com_sun_star_beans_PropertyValue_idl__
56 #include
<com
/sun
/star
/beans
/PropertyValue.idl
>
60 module com
{ module sun
{ module star
{ module rendering
{
63 interface XTextLayout
;
64 interface XPolyPolygon2D
;
66 /** This interface provides access to a specific, XCanvas-dependent
67 font incarnation. This font is not universally usable, but belongs
68 to the XCanvas it was queried from.
70 interface XCanvasFont
: ::com
::sun
::star
::uno
::XInterface
72 /** Create a text layout interface.<p>
74 Create a text layout interface for the given string, using
75 this font to generate the glyphs from.<p>
81 Main text direction for the string specified. The main text
82 direction is e.g. important for characters that are not
83 strong, i.e. that change affinity according to the current
84 writing direction. Make sure that across text portions and
85 lines, the direction is set consistently.
88 Optional random seed for OpenType glyph variations.
90 XTextLayout createTextLayout
( [in] StringContext aText
, [in] byte nDirection
, [in] hyper nRandomSeed
);
92 //-------------------------------------------------------------------------
94 /** Query the FontRequest that was used to generate this object.
96 FontRequest getFontRequest
();
98 //-------------------------------------------------------------------------
100 /** Query metric information about the font, that is generic to
103 Note that the metric values in the returned result are in the
104 font coordinate system, i.e. relative to the corresponding
105 size of this font. That is, when this font was created with a
106 cell size of 20 units, the metrics returned are calculated
107 relative to this size.
109 FontMetrics getFontMetrics
();
111 //-------------------------------------------------------------------------
113 /** Query the list of available font sizes.<p>
115 This method queries the list of available font sizes (in
116 device units) for this font. For scalable fonts that are not
117 restricted to discrete sizes, this list is <em>empty</em>,
118 meaning that every size is possible. Fonts that <em>do</em>
119 restrict the device size to certain discrete values, setting
120 an overall transformation that scales the
121 <member>FontRequest::CellSize</member> to something not
122 contained in the list returned by this method can lead to
123 visible disturbances.<p>
125 sequence
< double > getAvailableSizes
();
127 //-------------------------------------------------------------------------
129 /** Query the list of additional font properties.<p>
131 sequence
< ::com
::sun
::star
::beans
::PropertyValue
> getExtraFontProperties
();
133 //-------------------------------------------------------------------------