bug 27164; added new GetNormalLineHeight API for proper line-height
git-svn-id: svn://10.0.0.236/trunk@68261 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
bbec0a38d2
commit
5cd12e9864
@ -132,15 +132,22 @@ public:
|
||||
*/
|
||||
NS_IMETHOD GetHeight(nscoord &aHeight) = 0;
|
||||
|
||||
#if defined(XP_UNIX)
|
||||
#define NEW_FONT_HEIGHT_APIS 1
|
||||
#endif
|
||||
#ifdef NEW_FONT_HEIGHT_APIS
|
||||
/**
|
||||
* Returns the normal line height (em height + leading).
|
||||
*/
|
||||
NS_IMETHOD GetNormalLineHeight(nscoord &aHeight) = 0;
|
||||
#endif /* NEW_FONT_HEIGHT_APIS */
|
||||
|
||||
/**
|
||||
* Returns the amount of internal leading (in app units) for the font. This
|
||||
* is computed as the "height - (ascent + descent)"
|
||||
*/
|
||||
NS_IMETHOD GetLeading(nscoord &aLeading) = 0;
|
||||
|
||||
#if defined(XP_UNIX)
|
||||
#define NEW_FONT_HEIGHT_APIS 1
|
||||
#endif
|
||||
#ifdef NEW_FONT_HEIGHT_APIS
|
||||
|
||||
/**
|
||||
|
||||
@ -433,6 +433,12 @@ NS_IMETHODIMP nsFontMetricsGTK::GetHeight(nscoord &aHeight)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsGTK::GetNormalLineHeight(nscoord &aHeight)
|
||||
{
|
||||
aHeight = mEmHeight + mLeading;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFontMetricsGTK::GetLeading(nscoord &aLeading)
|
||||
{
|
||||
aLeading = mLeading;
|
||||
|
||||
@ -113,6 +113,7 @@ public:
|
||||
NS_IMETHOD GetUnderline(nscoord& aOffset, nscoord& aSize);
|
||||
|
||||
NS_IMETHOD GetHeight(nscoord &aHeight);
|
||||
NS_IMETHOD GetNormalLineHeight(nscoord &aHeight);
|
||||
NS_IMETHOD GetLeading(nscoord &aLeading);
|
||||
NS_IMETHOD GetEmHeight(nscoord &aHeight);
|
||||
NS_IMETHOD GetEmAscent(nscoord &aAscent);
|
||||
|
||||
@ -272,6 +272,16 @@ nsFontMetricsPS :: GetHeight(nscoord &aHeight)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* See documentation in nsFontMetricsPS.h
|
||||
*/
|
||||
NS_IMETHODIMP
|
||||
nsFontMetricsPS :: GetNormalLineHeight(nscoord &aHeight)
|
||||
{
|
||||
aHeight = mEmHeight + mLeading;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* See documentation in nsFontMetricsPS.h
|
||||
* @update 2/26/99 dwc
|
||||
|
||||
@ -54,6 +54,7 @@ public:
|
||||
NS_IMETHOD GetUnderline(nscoord& aOffset, nscoord& aSize);
|
||||
|
||||
NS_IMETHOD GetHeight(nscoord &aHeight);
|
||||
NS_IMETHOD GetNormalLineHeight(nscoord &aHeight);
|
||||
NS_IMETHOD GetLeading(nscoord &aLeading);
|
||||
NS_IMETHOD GetEmHeight(nscoord &aHeight);
|
||||
NS_IMETHOD GetEmAscent(nscoord &aAscent);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user