NS_IMETHODIMP nsThebesFontMetrics::GetMaxHeight(nscoord &aHeight) { aHeight = CEIL_TO_TWIPS(ComputeMaxAscent(GetMetrics())) + CEIL_TO_TWIPS(ComputeMaxDescent(GetMetrics(), mFontGroup)); return NS_OK; }
NS_IMETHODIMP nsThebesFontMetrics::GetAveCharWidth(nscoord& aAveCharWidth) { // Use CEIL instead of ROUND for consistency with GetMaxAdvance aAveCharWidth = CEIL_TO_TWIPS(GetMetrics().aveCharWidth); return NS_OK; }
nscoord nsFontMetrics::SpaceWidth() { // For vertical text with mixed or sideways orientation, we want the // width of a horizontal space (even if we're using vertical line-spacing // metrics, as with "writing-mode:vertical-*;text-orientation:mixed"). return CEIL_TO_TWIPS( GetMetrics(mVertical && mTextOrientation == NS_STYLE_TEXT_ORIENTATION_UPRIGHT ? gfxFont::eVertical : gfxFont::eHorizontal).spaceWidth); }
nscoord nsFontMetrics::SpaceWidth() { return CEIL_TO_TWIPS(GetMetrics().spaceWidth); }
nscoord nsFontMetrics::AveCharWidth() { // Use CEIL instead of ROUND for consistency with GetMaxAdvance return CEIL_TO_TWIPS(GetMetrics().aveCharWidth); }
nscoord nsFontMetrics::MaxAdvance() { return CEIL_TO_TWIPS(GetMetrics().maxAdvance); }
nscoord nsFontMetrics::MaxDescent() { return CEIL_TO_TWIPS(ComputeMaxDescent(GetMetrics(), mFontGroup)); }
nscoord nsFontMetrics::MaxAscent() { return CEIL_TO_TWIPS(ComputeMaxAscent(GetMetrics())); }
NS_IMETHODIMP nsThebesFontMetrics::GetSpaceWidth(nscoord& aSpaceCharWidth) { aSpaceCharWidth = CEIL_TO_TWIPS(GetMetrics().spaceWidth); return NS_OK; }
NS_IMETHODIMP nsThebesFontMetrics::GetMaxAdvance(nscoord &aAdvance) { aAdvance = CEIL_TO_TWIPS(GetMetrics().maxAdvance); return NS_OK; }
NS_IMETHODIMP nsThebesFontMetrics::GetMaxAscent(nscoord &aAscent) { aAscent = CEIL_TO_TWIPS(ComputeMaxAscent(GetMetrics())); return NS_OK; }