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_XCanvasFont_idl__ 24#define __com_sun_star_rendering_XCanvasFont_idl__ 25 26#ifndef __com_sun_star_uno_XInterface_idl__ 27#include <com/sun/star/uno/XInterface.idl> 28#endif 29#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 30#include <com/sun/star/lang/IllegalArgumentException.idl> 31#endif 32#ifndef __com_sun_star_geometry_RealRectangle2D_idl__ 33#include <com/sun/star/geometry/RealRectangle2D.idl> 34#endif 35#ifndef __com_sun_star_rendering_FontRequest_idl__ 36#include <com/sun/star/rendering/FontRequest.idl> 37#endif 38#ifndef __com_sun_star_rendering_FontMetrics_idl__ 39#include <com/sun/star/rendering/FontMetrics.idl> 40#endif 41#ifndef __com_sun_star_rendering_RenderState_idl__ 42#include <com/sun/star/rendering/RenderState.idl> 43#endif 44#ifndef __com_sun_star_rendering_ViewState_idl__ 45#include <com/sun/star/rendering/ViewState.idl> 46#endif 47#ifndef __com_sun_star_rendering_StringContext_idl__ 48#include <com/sun/star/rendering/StringContext.idl> 49#endif 50 51#ifndef __com_sun_star_beans_PropertyValue_idl__ 52#include <com/sun/star/beans/PropertyValue.idl> 53#endif 54 55 56module com { module sun { module star { module rendering { 57 58published interface XCanvas; 59published interface XTextLayout; 60published interface XPolyPolygon2D; 61 62/** This interface provides access to a specific, XCanvas-dependent 63 font incarnation. This font is not universally usable, but belongs 64 to the XCanvas it was queried from. 65 */ 66published interface XCanvasFont : ::com::sun::star::uno::XInterface 67{ 68 /** Create a text layout interface.<p> 69 70 Create a text layout interface for the given string, using 71 this font to generate the glyphs from.<p> 72 73 @param aText 74 The text to layout. 75 76 @param nDirection 77 Main text direction for the string specified. The main text 78 direction is e.g. important for characters that are not 79 strong, i.e. that change affinity according to the current 80 writing direction. Make sure that across text portions and 81 lines, the direction is set consistently. 82 83 @param nRandomSeed 84 Optional random seed for OpenType glyph variations. 85 */ 86 XTextLayout createTextLayout( [in] StringContext aText, [in] byte nDirection, [in] hyper nRandomSeed ); 87 88 //------------------------------------------------------------------------- 89 90 /** Query the FontRequest that was used to generate this object. 91 */ 92 FontRequest getFontRequest(); 93 94 //------------------------------------------------------------------------- 95 96 /** Query metric information about the font, that is generic to 97 all its glyphs.<p> 98 99 Note that the metric values in the returned result are in the 100 font coordinate system, i.e. relative to the corresponding 101 size of this font. That is, when this font was created with a 102 cell size of 20 units, the metrics returned are calculated 103 relative to this size. 104 */ 105 FontMetrics getFontMetrics(); 106 107 //------------------------------------------------------------------------- 108 109 /** Query the list of available font sizes.<p> 110 111 This method queries the list of available font sizes (in 112 device units) for this font. For scalable fonts that are not 113 restricted to discrete sizes, this list is <em>empty</em>, 114 meaning that every size is possible. Fonts that <em>do</em> 115 restrict the device size to certain discrete values, setting 116 an overall transformation that scales the 117 <member>FontRequest::CellSize</member> to something not 118 contained in the list returned by this method can lead to 119 visible disturbances.<p> 120 */ 121 sequence< double > getAvailableSizes(); 122 123 //------------------------------------------------------------------------- 124 125 /** Query the list of additional font properties.<p> 126 */ 127 sequence< ::com::sun::star::beans::PropertyValue > getExtraFontProperties(); 128 129 //------------------------------------------------------------------------- 130 131}; 132 133}; }; }; }; 134 135#endif 136 137