1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: FontMetrics.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_rendering_FontMetrics_idl__
31 #define __com_sun_star_rendering_FontMetrics_idl__
33 module com
{ module sun
{ module star
{ module rendering
{
35 /** Metrics global to the font, i.e. not specific to single
36 glyphs. The font height is defined as
37 ascent+descent+internalLeading, and therefore not explicitely
40 Please note that when querying FontMetrics from an XCanvasFont
41 interface, all values here are given relative to the font cell
42 size. That means, the referenceCharWidth and/or
43 ascent+descent+internalLeading will approximately (rounded to
44 integer device resolution, or exactly, if fractional font
45 rendering is enabled) match the referenceAdvancement/cellSize
46 members of the FontRequest for which the XCanvasFont was
47 queried. Please be aware that the values returned in this
48 structure only map one-to-one to device pixel, if the combined
49 rendering transformation for text output equals the identity
50 transformation. Otherwise, the text output (and thus the resulting
51 metrics) will be subject to that transformation. Depending on the
52 underlying font technology, actual device output might be off by
53 up to one device pixel from the transformed metrics.
59 /// Ascent (above the baseline) part of the font.
62 //-------------------------------------------------------------------------
64 /// Descent (below the baseline) part of the font.
67 //-------------------------------------------------------------------------
69 /// Extra space above ascent
70 double InternalLeading
;
72 //-------------------------------------------------------------------------
74 /** Extra space outside the font cells.<p>
76 It should not contain ink marks and is typically used
77 by the font designer to modify the line distance.<p>
79 double ExternalLeading
;
81 //-------------------------------------------------------------------------
83 /** This value specifies the reference character width of the
86 It's roughly equivalent to the average width of all
87 characters, and if one needs a font with double character
88 width, the referenceCharSize should be doubled.<p>
90 double ReferenceCharSize
;
92 //-------------------------------------------------------------------------
94 /** Specifies the offset to be added to the baseline when drawing
97 double UnderlineOffset
;
99 //-------------------------------------------------------------------------
101 /** Specifies the offset to be added to the baseline when striking
104 double StrikeThroughOffset
;