1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_rendering_FontRequest_idl__
24#define __com_sun_star_rendering_FontRequest_idl__
25
26#ifndef __com_sun_star_rendering_FontInfo_idl__
27#include <com/sun/star/rendering/FontInfo.idl>
28#endif
29
30#ifndef __com_sun_star_lang_Locale_idl__
31#include <com/sun/star/lang/Locale.idl>
32#endif
33
34module com { module sun { module star { module rendering {
35
36/** This structure contains all information necessary to describe a
37    font to be queried from XCanvas.<p>
38
39    Note: Outline fonts are to be requested as a special family, set
40    <member>FontInfo::FamilyName</member> appropriately. Emboss/relief
41    must be emulated by upper layers.<p>
42
43    Leave the <member>FontInfo::FamilyName</member> and
44    <member>FontInfo::StyleName</member> empty, if font selection
45    should only happen via the PANOSE description.
46
47    @since OpenOffice 2.0
48 */
49published struct FontRequest
50{
51    /** The description of the font.<p>
52
53        This member contains the description of the font as returned
54        by the font listing methods.<p>
55     */
56    FontInfo						FontDescription;
57
58    //-------------------------------------------------------------------------
59
60    /** The size of the font in <em>device</em> coordinate space.<p>
61
62        This value corresponds to the font height in Western scripts,
63        but is independent of the writing direction (see
64        <member>FontRequest::IsVertical</member> below). That
65        means, the value specified here is always measured orthogonal
66        to the text advancement (height for horizontal writing, and
67        width for vertical writing).<p>
68
69        When this value is negative, its absolute value is taken as
70        the character size of the font. If this value is positive,
71        it's taken as the cell size of the font.<p>
72
73        This member and the referenceAdvancement member are mutually
74        exclusive, one of them has to be set to 0 (which means don't
75        care).<p>
76
77        For distorted fonts, the render transformation must be
78        used. That is, the size specified here corresponds to device
79        pixel only if the combined render transformation during text
80        output equals the identity transform. This also applies to all
81        query methods, for both <type>XCanvasFont</type> and
82        <type>XTextLayout</type>.<p>
83    */
84    double                              CellSize;
85
86    //-------------------------------------------------------------------------
87
88    /** This value specifies the size of the font in the writing
89        direction (i.e. width for horizontal writing, and height for
90        vertical writing).<p>
91
92        It is equivalent to the referenceCharSize of the FontMetrics
93        structure.<p>
94
95        This member and the cellSize member are mutually exclusive,
96        one of them has to be set to 0 (which means don't care). For
97        distorted fonts, the font matrix must be used.<p>
98     */
99    double							ReferenceAdvancement;
100
101    //-------------------------------------------------------------------------
102
103    /** The locale this font should be able to render.<p>
104
105        This member supplements the
106        <member>FontInfo::UnicodeRange0</member> entry with a specific
107        locale; this is e.g. important when selecting between
108        traditional and simplified chinese is necessary (since the
109        letters have the same unicode ranges and character values).<p>
110     */
111    ::com::sun::star::lang::Locale	Locale;
112
113};
114
115}; }; }; };
116
117#endif
118