Logo Search packages:      
Sourcecode: xulrunner version File versions

nsIFontMetrics Class Reference

#include <nsIFontMetrics.h>

Inheritance diagram for nsIFontMetrics:

nsISupports

List of all members.


Detailed Description

Font metrics interface

This interface may be somewhat misnamed. A better name might be nsIFontList. The style system uses the nsFont struct for various font properties, one of which is font-family, which can contain a *list* of font names. The nsFont struct is "realized" by asking the device context to cough up an nsIFontMetrics object, which contains a list of real font handles, one for each font mentioned in font-family (and for each fallback when we fall off the end of that list).

The style system needs to have access to certain metrics, such as the em height (for the CSS "em" unit), and we use the first Western font's metrics for that purpose. The platform-specific implementations are expected to select non-Western fonts that "fit" reasonably well with the Western font that is loaded at Init time.

Definition at line 78 of file nsIFontMetrics.h.


Public Member Functions

NS_IMETHOD Destroy ()=0
const nsFont & Font ()
NS_IMETHOD GetAveCharWidth (nscoord &aAveCharWidth)=0
NS_IMETHOD GetEmAscent (nscoord &aAscent)=0
NS_IMETHOD GetEmDescent (nscoord &aDescent)=0
NS_IMETHOD GetEmHeight (nscoord &aHeight)=0
NS_IMETHOD GetExternalLeading (nscoord &aLeading)=0
NS_IMETHOD GetFontHandle (nsFontHandle &aHandle)=0
NS_IMETHOD GetHeight (nscoord &aHeight)=0
NS_IMETHOD GetInternalLeading (nscoord &aLeading)=0
NS_IMETHOD GetLangGroup (nsIAtom **aLangGroup)=0
NS_IMETHOD GetMaxAdvance (nscoord &aAdvance)=0
NS_IMETHOD GetMaxAscent (nscoord &aAscent)=0
NS_IMETHOD GetMaxDescent (nscoord &aDescent)=0
NS_IMETHOD GetMaxHeight (nscoord &aHeight)=0
NS_IMETHOD GetSpaceWidth (nscoord &aSpaceCharWidth)=0
NS_IMETHOD GetStrikeout (nscoord &aOffset, nscoord &aSize)=0
NS_IMETHOD GetSubscriptOffset (nscoord &aResult)=0
NS_IMETHOD GetSuperscriptOffset (nscoord &aResult)=0
NS_IMETHOD GetUnderline (nscoord &aOffset, nscoord &aSize)=0
NS_IMETHOD GetXHeight (nscoord &aResult)=0
NS_IMETHOD Init (const nsFont &aFont, nsIAtom *aLangGroup, nsIDeviceContext *aContext)=0
Methods
 NS_IMETHOD_ (nsrefcnt) Release(void)=0
 NS_IMETHOD_ (nsrefcnt) AddRef(void)=0
NS_IMETHOD QueryInterface (REFNSIID aIID, void **aInstancePtr)=0

Protected Attributes

nsFont mFont

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index