bug 27164; added new font height APIs for PostScript module

This commit is contained in:
erik%netscape.com 2000-04-26 21:52:05 +00:00
Родитель b1f7d3b986
Коммит aeffbdd22b
2 изменённых файлов: 52 добавлений и 0 удалений

Просмотреть файл

@ -195,6 +195,10 @@ float offset;
mDescent = -(NSToCoordRound(offset));
mLeading = 0;
mEmHeight = mHeight;
mEmAscent = mAscent;
mEmDescent = mDescent;
mMaxHeight = mHeight;
mMaxAscent = mAscent;
mMaxDescent = mDescent;
mMaxAdvance = mHeight;
@ -279,6 +283,46 @@ nsFontMetricsPS :: GetLeading(nscoord &aLeading)
return NS_OK;
}
/** ---------------------------------------------------
* See documentation in nsFontMetricsPS.h
*/
NS_IMETHODIMP
nsFontMetricsPS :: GetEmHeight(nscoord &aHeight)
{
aHeight = mEmHeight;
return NS_OK;
}
/** ---------------------------------------------------
* See documentation in nsFontMetricsPS.h
*/
NS_IMETHODIMP
nsFontMetricsPS :: GetEmAscent(nscoord &aAscent)
{
aAscent = mEmAscent;
return NS_OK;
}
/** ---------------------------------------------------
* See documentation in nsFontMetricsPS.h
*/
NS_IMETHODIMP
nsFontMetricsPS :: GetEmDescent(nscoord &aDescent)
{
aDescent = mEmDescent;
return NS_OK;
}
/** ---------------------------------------------------
* See documentation in nsFontMetricsPS.h
*/
NS_IMETHODIMP
nsFontMetricsPS :: GetMaxHeight(nscoord &aHeight)
{
aHeight = mMaxHeight;
return NS_OK;
}
/** ---------------------------------------------------
* See documentation in nsFontMetricsPS.h
* @update 2/26/99 dwc

Просмотреть файл

@ -55,6 +55,10 @@ public:
NS_IMETHOD GetHeight(nscoord &aHeight);
NS_IMETHOD GetLeading(nscoord &aLeading);
NS_IMETHOD GetEmHeight(nscoord &aHeight);
NS_IMETHOD GetEmAscent(nscoord &aAscent);
NS_IMETHOD GetEmDescent(nscoord &aDescent);
NS_IMETHOD GetMaxHeight(nscoord &aHeight);
NS_IMETHOD GetMaxAscent(nscoord &aAscent);
NS_IMETHOD GetMaxDescent(nscoord &aDescent);
NS_IMETHOD GetMaxAdvance(nscoord &aAdvance);
@ -75,6 +79,10 @@ protected:
nscoord mAscent;
nscoord mDescent;
nscoord mLeading;
nscoord mEmHeight;
nscoord mEmAscent;
nscoord mEmDescent;
nscoord mMaxHeight;
nscoord mMaxAscent;
nscoord mMaxDescent;
nscoord mMaxAdvance;