From c62d553166118c93df4ea400fbd5f9f7faa4db65 Mon Sep 17 00:00:00 2001 From: "pinkerton%netscape.com" Date: Tue, 11 May 1999 21:43:54 +0000 Subject: [PATCH] FetchFontInfo not yet in Carbon. This will be fixed, but is hacked around for now. --- gfx/src/mac/nsFontMetricsMac.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gfx/src/mac/nsFontMetricsMac.cpp b/gfx/src/mac/nsFontMetricsMac.cpp index 4211675f914..71f9115ba55 100644 --- a/gfx/src/mac/nsFontMetricsMac.cpp +++ b/gfx/src/mac/nsFontMetricsMac.cpp @@ -59,8 +59,16 @@ NS_IMETHODIMP nsFontMetricsMac :: Init(const nsFont& aFont, nsIDeviceContext* aC FontInfo fInfo; // FetchFontInfo gets the font info without having to touch a grafport. It's 8.5 only + #if !TARGET_CARBON OSErr err = ::FetchFontInfo(mFontNum, theStyle.tsSize, theStyle.tsFace, &fInfo); NS_ASSERTION(err == noErr, "Error in FetchFontInfo"); + #else + // pinkerton - hack because this routine isn't yet in carbon. + fInfo.ascent = theStyle.tsSize; + fInfo.descent = 3; + fInfo.widMax = 12; + fInfo.leading = 3; + #endif float dev2app; mContext->GetDevUnitsToAppUnits(dev2app);