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_rendering_FontRequest_idl__
28#define __com_sun_star_rendering_FontRequest_idl__
29
30#ifndef __com_sun_star_rendering_FontInfo_idl__
31#include <com/sun/star/rendering/FontInfo.idl>
32#endif
33
34#ifndef __com_sun_star_lang_Locale_idl__
35#include <com/sun/star/lang/Locale.idl>
36#endif
37
38module com { module sun { module star { module rendering {
39
40/** This structure contains all information necessary to describe a
41    font to be queried from XCanvas.<p>
42
43    Note: Outline fonts are to be requested as a special family, set
44    <member>FontInfo::FamilyName</member> appropriately. Emboss/relief
45    must be emulated by upper layers.<p>
46
47    Leave the <member>FontInfo::FamilyName</member> and
48    <member>FontInfo::StyleName</member> empty, if font selection
49    should only happen via the PANOSE description.
50
51    @since OOo 2.0
52 */
53published struct FontRequest
54{
55    /** The description of the font.<p>
56
57        This member contains the description of the font as returned
58        by the font listing methods.<p>
59     */
60    FontInfo						FontDescription;
61
62    //-------------------------------------------------------------------------
63
64    /** The size of the font in <em>device</em> coordinate space.<p>
65
66        This value corresponds to the font height in Western scripts,
67        but is independent of the writing direction (see
68        <member>FontRequest::IsVertical</member> below). That
69        means, the value specified here is always measured orthogonal
70        to the text advancement (height for horizontal writing, and
71        width for vertical writing).<p>
72
73        When this value is negative, its absolute value is taken as
74        the character size of the font. If this value is positive,
75        it's taken as the cell size of the font.<p>
76
77        This member and the referenceAdvancement member are mutually
78        exclusive, one of them has to be set to 0 (which means don't
79        care).<p>
80
81        For distorted fonts, the render transformation must be
82        used. That is, the size specified here corresponds to device
83        pixel only if the combined render transformation during text
84        output equals the identity transform. This also applies to all
85        query methods, for both <type>XCanvasFont</type> and
86        <type>XTextLayout</type>.<p>
87    */
88    double                              CellSize;
89
90    //-------------------------------------------------------------------------
91
92    /** This value specifies the size of the font in the writing
93        direction (i.e. width for horizontal writing, and height for
94        vertical writing).<p>
95
96        It is equivalent to the referenceCharSize of the FontMetrics
97        structure.<p>
98
99        This member and the cellSize member are mutually exclusive,
100        one of them has to be set to 0 (which means don't care). For
101        distorted fonts, the font matrix must be used.<p>
102     */
103    double							ReferenceAdvancement;
104
105    //-------------------------------------------------------------------------
106
107    /** The locale this font should be able to render.<p>
108
109        This member supplements the
110        <member>FontInfo::UnicodeRange0</member> entry with a specific
111        locale; this is e.g. important when selecting between
112        traditional and simplified chinese is necessary (since the
113        letters have the same unicode ranges and character values).<p>
114     */
115    ::com::sun::star::lang::Locale	Locale;
116
117};
118
119}; }; }; };
120
121#endif
122