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