1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_rendering_XCanvasFont_idl__
20 #define __com_sun_star_rendering_XCanvasFont_idl__
22 #include
<com
/sun
/star
/uno
/XInterface.idl
>
23 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
24 #include
<com
/sun
/star
/geometry
/RealRectangle2D.idl
>
25 #include
<com
/sun
/star
/rendering
/FontRequest.idl
>
26 #include
<com
/sun
/star
/rendering
/FontMetrics.idl
>
27 #include
<com
/sun
/star
/rendering
/RenderState.idl
>
28 #include
<com
/sun
/star
/rendering
/ViewState.idl
>
29 #include
<com
/sun
/star
/rendering
/StringContext.idl
>
30 #include
<com
/sun
/star
/beans
/PropertyValue.idl
>
33 module com
{ module sun
{ module star
{ module rendering
{
36 interface XTextLayout
;
37 interface XPolyPolygon2D
;
39 /** This interface provides access to a specific, XCanvas-dependent
40 font incarnation. This font is not universally usable, but belongs
41 to the XCanvas it was queried from.
43 interface XCanvasFont
: ::com
::sun
::star
::uno
::XInterface
45 /** Create a text layout interface.<p>
47 Create a text layout interface for the given string, using
48 this font to generate the glyphs from.<p>
54 Main text direction for the string specified. The main text
55 direction is e.g. important for characters that are not
56 strong, i.e. that change affinity according to the current
57 writing direction. Make sure that across text portions and
58 lines, the direction is set consistently.
61 Optional random seed for OpenType glyph variations.
63 XTextLayout createTextLayout
( [in] StringContext aText
, [in] byte nDirection
, [in] hyper nRandomSeed
);
66 /** Query the FontRequest that was used to generate this object.
68 FontRequest getFontRequest
();
71 /** Query metric information about the font, that is generic to
74 Note that the metric values in the returned result are in the
75 font coordinate system, i.e. relative to the corresponding
76 size of this font. That is, when this font was created with a
77 cell size of 20 units, the metrics returned are calculated
78 relative to this size.
80 FontMetrics getFontMetrics
();
83 /** Query the list of available font sizes.<p>
85 This method queries the list of available font sizes (in
86 device units) for this font. For scalable fonts that are not
87 restricted to discrete sizes, this list is <em>empty</em>,
88 meaning that every size is possible. Fonts that <em>do</em>
89 restrict the device size to certain discrete values, setting
90 an overall transformation that scales the
91 FontRequest::CellSize to something not
92 contained in the list returned by this method can lead to
93 visible disturbances.<p>
95 sequence
< double > getAvailableSizes
();
98 /** Query the list of additional font properties.<p>
100 sequence
< ::com
::sun
::star
::beans
::PropertyValue
> getExtraFontProperties
();
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */