openbsd-ports/www/mozilla/patches/patch-gfx_src_ps_nsFontMetricsPS_cpp
kurt f353d0daae Upgrade to 1.7.5
Tested on i386/sparc64/macppc/alpha by myself and/or alek@
One issue found with sparc64: fetching mail crashes.

okay pval@
2005-03-13 05:02:16 +00:00

62 lines
2.2 KiB
Plaintext

$OpenBSD: patch-gfx_src_ps_nsFontMetricsPS_cpp,v 1.2 2005/03/13 05:02:17 kurt Exp $
--- gfx/src/ps/nsFontMetricsPS.cpp.orig Wed Feb 4 20:57:05 2004
+++ gfx/src/ps/nsFontMetricsPS.cpp Mon Jan 12 22:11:11 2004
@@ -1141,10 +1141,10 @@ nsFontPSFreeType::Init(nsITrueTypeFontCa
mPixelSize = NSToIntRound(app2dev * mFont->size);
- mImageDesc.font.face_id = (void*)mEntry;
- mImageDesc.font.pix_width = mPixelSize;
- mImageDesc.font.pix_height = mPixelSize;
- mImageDesc.image_type = 0;
+ mImageDesc->face_id = (FTC_FaceID)&mEntry;
+ mImageDesc->width = mPixelSize;
+ mImageDesc->height = mPixelSize;
+ mImageDesc->flags = 0;
nsresult rv;
mFt2 = do_GetService(NS_FREETYPE2_CONTRACTID, &rv);
@@ -1190,7 +1190,7 @@ nsFontPSFreeType::GetWidth(const PRUnich
if (!face)
return 0;
- FTC_Image_Cache iCache;
+ FTC_ImageCache iCache;
nsresult rv = mFt2->GetImageCache(&iCache);
if (NS_FAILED(rv)) {
NS_ERROR("Failed to get Image Cache");
@@ -1228,8 +1228,8 @@ nsFontPSFreeType::getFTFace()
FTC_Manager cManager;
mFt2->GetFTCacheManager(&cManager);
- nsresult rv = mFt2->ManagerLookupSize(cManager, &mImageDesc.font,
- &face, nsnull);
+ nsresult rv = mFt2->ManagerLookupFace(cManager, mImageDesc->face_id,
+ &face);
NS_ASSERTION(rv==0, "failed to get face/size");
if (rv)
return nsnull;
@@ -1622,16 +1622,16 @@ void nsFT2Type8Generator::GeneratePSFont
mEntry->GetFamilyName(fontName);
mEntry->GetStyleName(styleName);
- mImageDesc.font.face_id = (void*)mEntry;
+ mImageDesc->face_id = (FTC_FaceID)&mEntry;
// TT glyph has no relation to size
- mImageDesc.font.pix_width = 16;
- mImageDesc.font.pix_height = 16;
- mImageDesc.image_type = 0;
+ mImageDesc->width = 16;
+ mImageDesc->height = 16;
+ mImageDesc->flags = 0;
FT_Face face = nsnull;
FTC_Manager cManager;
mFt2->GetFTCacheManager(&cManager);
- nsresult rv = mFt2->ManagerLookupSize(cManager, &mImageDesc.font,
- &face, nsnull);
+ nsresult rv = mFt2->ManagerLookupFace(cManager, mImageDesc->face_id,
+ &face);
if (NS_FAILED(rv))
return;