summaryrefslogtreecommitdiff
path: root/www/firefox
diff options
context:
space:
mode:
authoradam <adam@pkgsrc.org>2004-04-29 14:13:19 +0000
committeradam <adam@pkgsrc.org>2004-04-29 14:13:19 +0000
commit053c3be42b32022400c7f3eced35245e489ecaf2 (patch)
treef75f817a3ec03f275ae8fd5f06c8885e578235c8 /www/firefox
parentd0cc6c4a5f45db9dfd89774444dbdd07438c9f85 (diff)
downloadpkgsrc-053c3be42b32022400c7f3eced35245e489ecaf2.tar.gz
Fixed problems with the new freetype2 library
Diffstat (limited to 'www/firefox')
-rw-r--r--www/firefox/distinfo9
-rw-r--r--www/firefox/patches/patch-ah48
-rw-r--r--www/firefox/patches/patch-ai62
-rw-r--r--www/firefox/patches/patch-aj40
-rw-r--r--www/firefox/patches/patch-ak61
-rw-r--r--www/firefox/patches/patch-al22
-rw-r--r--www/firefox/patches/patch-an13
-rw-r--r--www/firefox/patches/patch-ao75
8 files changed, 329 insertions, 1 deletions
diff --git a/www/firefox/distinfo b/www/firefox/distinfo
index 7e81f9afd53..0fff53cf5b8 100644
--- a/www/firefox/distinfo
+++ b/www/firefox/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2004/04/24 01:21:17 taya Exp $
+$NetBSD: distinfo,v 1.3 2004/04/29 14:13:19 adam Exp $
SHA1 (firefox-source-0.8.tar.bz2) = 8282f17a8f51265a86923c03362bba629162bf05
Size (firefox-source-0.8.tar.bz2) = 31102943 bytes
@@ -8,7 +8,14 @@ SHA1 (patch-ad) = 09091d0a2ded2775ca35d1315ae9b95c506b28ef
SHA1 (patch-ae) = 99935f034e6485e9e0d4eaf20e6ddd2b90b75ad5
SHA1 (patch-af) = 3b6f5c71146b3a402b164b7f10fb652408712b73
SHA1 (patch-ag) = fd8470f7ac0003797401ed68f459315170cbe9a8
+SHA1 (patch-ah) = d047cad352d83aacb76321ee499184ae81fc9b40
+SHA1 (patch-ai) = bc3f841e16ca81962cfe5d082527bc3891c7d8b2
+SHA1 (patch-aj) = e1fd4c748b344507eb580d2efab3b2be625b64e5
+SHA1 (patch-ak) = d47b4b2904e91eaf6b6042c20594db5e559d126d
+SHA1 (patch-al) = bd326a62794a5665dd929b59a96c24fbac51a1a3
SHA1 (patch-am) = ddb7b53e5be832de9479d28735861a64ef34875f
+SHA1 (patch-an) = 78b448a64c2a46bc3a1d458bdbcb5d64be1ed9f4
+SHA1 (patch-ao) = 7048e3a06d1569e31d2350c2473887a50aa81498
SHA1 (patch-aw) = ba1a408cd3b44dcd2123672ec4cbcefb436e5330
SHA1 (patch-ax) = 070c88dee0446b093ab1c2a9120dc1747642d46f
SHA1 (patch-ay) = b9bc5ce449c6851781b12cd1e7bc43186b3654fd
diff --git a/www/firefox/patches/patch-ah b/www/firefox/patches/patch-ah
new file mode 100644
index 00000000000..229c0245563
--- /dev/null
+++ b/www/firefox/patches/patch-ah
@@ -0,0 +1,48 @@
+$NetBSD: patch-ah,v 1.1 2004/04/29 14:13:19 adam Exp $
+
+--- gfx/idl/nsIFreeType2.idl.orig 2004-04-29 10:46:15.000000000 +0000
++++ gfx/idl/nsIFreeType2.idl
+@@ -72,10 +72,11 @@ native FT_Pointer(FT_Pointer);
+ native FT_Sfnt_Tag(FT_Sfnt_Tag);
+ native FT_Size(FT_Size);
+
+-[ptr] native FTC_Image_Desc_p(FTC_Image_Desc);
++[ptr] native FTC_ImageType_p(FTC_ImageType);
+ native FTC_Face_Requester(FTC_Face_Requester);
+ native FTC_Font(FTC_Font);
+-native FTC_Image_Cache(FTC_Image_Cache);
++native FTC_FaceID(FTC_FaceID);
++native FTC_ImageCache(FTC_ImageCache);
+ native FTC_Manager(FTC_Manager);
+
+ /*
+@@ -87,7 +88,7 @@ interface nsIFreeType2 : nsISupports
+
+ readonly attribute FT_Library library;
+ readonly attribute FTC_Manager FTCacheManager;
+- readonly attribute FTC_Image_Cache ImageCache;
++ readonly attribute FTC_ImageCache ImageCache;
+
+ void doneFace(in FT_Face face);
+ void doneFreeType(in FT_Library lib);
+@@ -103,16 +104,16 @@ interface nsIFreeType2 : nsISupports
+ void outlineDecompose(in FT_Outline_p outline,
+ in const_FT_Outline_Funcs_p funcs, in voidPtr p);
+ void setCharmap(in FT_Face face, in FT_CharMap charmap);
+- void imageCacheLookup(in FTC_Image_Cache cache, in FTC_Image_Desc_p desc,
++ void imageCacheLookup(in FTC_ImageCache cache, in FTC_ImageType_p desc,
+ in FT_UInt gindex, out FT_Glyph glyph);
+- void managerLookupSize(in FTC_Manager manager, in FTC_Font font,
+- out FT_Face face, out FT_Size size);
++ void managerLookupFace(in FTC_Manager manager, in FTC_FaceID face_id,
++ out FT_Face face);
+ void managerDone(in FTC_Manager manager);
+ void managerNew(in FT_Library lib, in FT_UInt max_faces,
+ in FT_UInt max_sizes, in FT_ULong max_bytes,
+ in FTC_Face_Requester requester, in FT_Pointer req_data,
+ out FTC_Manager manager);
+- void imageCacheNew(in FTC_Manager manager, out FTC_Image_Cache cache);
++ void imageCacheNew(in FTC_Manager manager, out FTC_ImageCache cache);
+
+ FT_ULong getFirstChar(in FT_Face face, out FT_UInt gindex);
+ FT_ULong getNextChar(in FT_Face face, in FT_ULong charcode, out FT_UInt gindex);
diff --git a/www/firefox/patches/patch-ai b/www/firefox/patches/patch-ai
new file mode 100644
index 00000000000..48586fc76f5
--- /dev/null
+++ b/www/firefox/patches/patch-ai
@@ -0,0 +1,62 @@
+$NetBSD: patch-ai,v 1.1 2004/04/29 14:13:19 adam Exp $
+
+--- gfx/src/ps/nsFontMetricsPS.cpp.orig 2004-04-29 11:18:03.000000000 +0000
++++ gfx/src/ps/nsFontMetricsPS.cpp
+@@ -1126,10 +1126,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);
+@@ -1175,7 +1175,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");
+@@ -1213,8 +1213,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;
+@@ -1609,16 +1609,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;
+
diff --git a/www/firefox/patches/patch-aj b/www/firefox/patches/patch-aj
new file mode 100644
index 00000000000..cdf08af22c5
--- /dev/null
+++ b/www/firefox/patches/patch-aj
@@ -0,0 +1,40 @@
+$NetBSD: patch-aj,v 1.1 2004/04/29 14:13:19 adam Exp $
+
+--- gfx/src/freetype/nsFreeType.h.orig 2003-06-11 18:15:22.000000000 +0000
++++ gfx/src/freetype/nsFreeType.h
+@@ -104,13 +104,13 @@ typedef FT_Error (*FT_Outline_Decompose_
+ typedef FT_Error (*FT_New_Face_t)(FT_Library, const char*, FT_Long, FT_Face*);
+ typedef FT_Error (*FT_Set_Charmap_t)(FT_Face face, FT_CharMap charmap);
+ typedef FT_Error (*FTC_Image_Cache_Lookup_t)
+- (FTC_Image_Cache, FTC_Image_Desc*, FT_UInt, FT_Glyph*);
+-typedef FT_Error (*FTC_Manager_Lookup_Size_t)
+- (FTC_Manager, FTC_Font, FT_Face*, FT_Size*);
++ (FTC_ImageCache, FTC_ImageType*, FT_UInt, FT_Glyph*);
++typedef FT_Error (*FTC_Manager_LookupFace_t)
++ (FTC_Manager, FTC_FaceID, FT_Face*);
+ typedef FT_Error (*FTC_Manager_Done_t)(FTC_Manager);
+ typedef FT_Error (*FTC_Manager_New_t)(FT_Library, FT_UInt, FT_UInt, FT_ULong,
+ FTC_Face_Requester, FT_Pointer, FTC_Manager*);
+-typedef FT_Error (*FTC_Image_Cache_New_t)(FTC_Manager, FTC_Image_Cache*);
++typedef FT_Error (*FTC_Image_Cache_New_t)(FTC_Manager, FTC_ImageCache*);
+
+ typedef FT_ULong (*FT_Get_First_Char_t)(FT_Face, FT_UInt*);
+ typedef FT_ULong (*FT_Get_Next_Char_t)(FT_Face, FT_ULong, FT_UInt*);
+@@ -157,7 +157,7 @@ protected:
+ FT_Outline_Decompose_t nsFT_Outline_Decompose;
+ FT_Set_Charmap_t nsFT_Set_Charmap;
+ FTC_Image_Cache_Lookup_t nsFTC_Image_Cache_Lookup;
+- FTC_Manager_Lookup_Size_t nsFTC_Manager_Lookup_Size;
++ FTC_Manager_LookupFace_t nsFTC_Manager_LookupFace;
+ FTC_Manager_Done_t nsFTC_Manager_Done;
+ FTC_Manager_New_t nsFTC_Manager_New;
+ FTC_Image_Cache_New_t nsFTC_Image_Cache_New;
+@@ -195,7 +195,7 @@ protected:
+ PRLibrary *mSharedLib;
+ FT_Library mFreeTypeLibrary;
+ FTC_Manager mFTCacheManager;
+- FTC_Image_Cache mImageCache;
++ FTC_ImageCache mImageCache;
+
+ static nsHashtable *sFontFamilies;
+ static nsHashtable *sRange1CharSetNames;
diff --git a/www/firefox/patches/patch-ak b/www/firefox/patches/patch-ak
new file mode 100644
index 00000000000..78d5cb89c20
--- /dev/null
+++ b/www/firefox/patches/patch-ak
@@ -0,0 +1,61 @@
+$NetBSD: patch-ak,v 1.1 2004/04/29 14:13:19 adam Exp $
+
+--- gfx/src/freetype/nsFreeType.cpp.orig 2003-09-07 22:20:37.000000000 +0000
++++ gfx/src/freetype/nsFreeType.cpp
+@@ -110,11 +110,11 @@ FtFuncList nsFreeType2::FtFuncs [] = {
+ {"FT_New_Face", NS_FT2_OFFSET(nsFT_New_Face), PR_TRUE},
+ {"FT_Outline_Decompose", NS_FT2_OFFSET(nsFT_Outline_Decompose), PR_TRUE},
+ {"FT_Set_Charmap", NS_FT2_OFFSET(nsFT_Set_Charmap), PR_TRUE},
+- {"FTC_Image_Cache_Lookup", NS_FT2_OFFSET(nsFTC_Image_Cache_Lookup), PR_TRUE},
+- {"FTC_Manager_Lookup_Size", NS_FT2_OFFSET(nsFTC_Manager_Lookup_Size), PR_TRUE},
++ {"FTC_ImageCache_Lookup", NS_FT2_OFFSET(nsFTC_Image_Cache_Lookup), PR_TRUE},
++ {"FTC_Manager_LookupFace", NS_FT2_OFFSET(nsFTC_Manager_LookupFace), PR_TRUE},
+ {"FTC_Manager_Done", NS_FT2_OFFSET(nsFTC_Manager_Done), PR_TRUE},
+ {"FTC_Manager_New", NS_FT2_OFFSET(nsFTC_Manager_New), PR_TRUE},
+- {"FTC_Image_Cache_New", NS_FT2_OFFSET(nsFTC_Image_Cache_New), PR_TRUE},
++ {"FTC_ImageCache_New", NS_FT2_OFFSET(nsFTC_Image_Cache_New), PR_TRUE},
+ {"FT_Get_First_Char", NS_FT2_OFFSET(nsFT_Get_First_Char), PR_FALSE},
+ {"FT_Get_Next_Char", NS_FT2_OFFSET(nsFT_Get_Next_Char), PR_FALSE},
+ {nsnull, 0, 0},
+@@ -276,7 +276,7 @@ nsFreeType2::SetCharmap(FT_Face face, FT
+ }
+
+ NS_IMETHODIMP
+-nsFreeType2::ImageCacheLookup(FTC_Image_Cache cache, FTC_Image_Desc *desc,
++nsFreeType2::ImageCacheLookup(FTC_ImageCache cache, FTC_ImageType *desc,
+ FT_UInt glyphID, FT_Glyph *glyph)
+ {
+ // call the FreeType2 function via the function pointer
+@@ -285,11 +285,11 @@ nsFreeType2::ImageCacheLookup(FTC_Image_
+ }
+
+ NS_IMETHODIMP
+-nsFreeType2::ManagerLookupSize(FTC_Manager manager, FTC_Font font,
+- FT_Face *face, FT_Size *size)
++nsFreeType2::ManagerLookupFace(FTC_Manager manager, FTC_FaceID face_id,
++ FT_Face *face)
+ {
+ // call the FreeType2 function via the function pointer
+- FT_Error error = nsFTC_Manager_Lookup_Size(manager, font, face, size);
++ FT_Error error = nsFTC_Manager_LookupFace(manager, face_id, face);
+ return error ? NS_ERROR_FAILURE : NS_OK;
+ }
+
+@@ -314,7 +314,7 @@ nsFreeType2::ManagerNew(FT_Library libra
+ }
+
+ NS_IMETHODIMP
+-nsFreeType2::ImageCacheNew(FTC_Manager manager, FTC_Image_Cache *cache)
++nsFreeType2::ImageCacheNew(FTC_Manager manager, FTC_ImageCache *cache)
+ {
+ // call the FreeType2 function via the function pointer
+ FT_Error error = nsFTC_Image_Cache_New(manager, cache);
+@@ -345,7 +345,7 @@ nsFreeType2::SupportsExtFunc(PRBool *res
+ }
+
+ NS_IMETHODIMP
+-nsFreeType2::GetImageCache(FTC_Image_Cache *aCache)
++nsFreeType2::GetImageCache(FTC_ImageCache *aCache)
+ {
+ *aCache = mImageCache;
+ return NS_OK;
diff --git a/www/firefox/patches/patch-al b/www/firefox/patches/patch-al
new file mode 100644
index 00000000000..d0be0c26ab0
--- /dev/null
+++ b/www/firefox/patches/patch-al
@@ -0,0 +1,22 @@
+$NetBSD: patch-al,v 1.1 2004/04/29 14:13:19 adam Exp $
+
+--- gfx/src/ps/nsFontMetricsPS.h.orig 2004-04-29 11:13:06.000000000 +0000
++++ gfx/src/ps/nsFontMetricsPS.h
+@@ -320,7 +320,7 @@ protected:
+ nsCOMPtr<nsITrueTypeFontCatalogEntry> mFaceID;
+ nsCOMPtr<nsIFreeType2> mFt2;
+ PRUint16 mPixelSize;
+- FTC_Image_Desc mImageDesc;
++ FTC_ImageType mImageDesc;
+
+
+ static PRBool AddUserPref(nsIAtom *aLang, const nsFont& aFont,
+@@ -363,7 +363,7 @@ public:
+ protected:
+ nsCOMPtr<nsITrueTypeFontCatalogEntry> mEntry;
+ nsCOMPtr<nsIFreeType2> mFt2;
+- FTC_Image_Desc mImageDesc;
++ FTC_ImageType mImageDesc;
+ };
+ #endif
+
diff --git a/www/firefox/patches/patch-an b/www/firefox/patches/patch-an
new file mode 100644
index 00000000000..5cd5fdd610b
--- /dev/null
+++ b/www/firefox/patches/patch-an
@@ -0,0 +1,13 @@
+$NetBSD: patch-an,v 1.1 2004/04/29 14:13:19 adam Exp $
+
+--- gfx/src/x11shared/nsFontFreeType.h.orig 2004-04-29 12:34:09.000000000 +0000
++++ gfx/src/x11shared/nsFontFreeType.h
+@@ -110,7 +110,7 @@ protected:
+ XImage *GetXImage(PRUint32 width, PRUint32 height);
+ nsITrueTypeFontCatalogEntry *mFaceID;
+ PRUint16 mPixelSize;
+- FTC_Image_Desc mImageDesc;
++ FTC_ImageType mImageDesc;
+ nsCOMPtr<nsIFreeType2> mFt2;
+ };
+
diff --git a/www/firefox/patches/patch-ao b/www/firefox/patches/patch-ao
new file mode 100644
index 00000000000..33cacdfd170
--- /dev/null
+++ b/www/firefox/patches/patch-ao
@@ -0,0 +1,75 @@
+$NetBSD: patch-ao,v 1.1 2004/04/29 14:13:19 adam Exp $
+
+--- gfx/src/x11shared/nsFontFreeType.cpp.orig 2004-04-29 12:32:42.000000000 +0000
++++ gfx/src/x11shared/nsFontFreeType.cpp
+@@ -177,7 +177,7 @@ nsFreeTypeFont::getFTFace()
+ FTC_Manager mgr;
+ nsresult rv;
+ mFt2->GetFTCacheManager(&mgr);
+- rv = mFt2->ManagerLookupSize(mgr, &mImageDesc.font, &face, nsnull);
++ rv = mFt2->ManagerLookupFace(mgr, mImageDesc->face_id, &face);
+ NS_ASSERTION(NS_SUCCEEDED(rv), "failed to get face/size");
+ if (NS_FAILED(rv))
+ return nsnull;
+@@ -191,22 +191,15 @@ nsFreeTypeFont::nsFreeTypeFont(nsITrueTy
+ PRBool embedded_bimap = PR_FALSE;
+ mFaceID = aFaceID;
+ mPixelSize = aPixelSize;
+- mImageDesc.font.face_id = (void*)mFaceID;
+- mImageDesc.font.pix_width = aPixelSize;
+- mImageDesc.font.pix_height = aPixelSize;
+- mImageDesc.image_type = 0;
++ mImageDesc->face_id = (FTC_FaceID)&mFaceID;
++ mImageDesc->width = aPixelSize;
++ mImageDesc->height = aPixelSize;
++ mImageDesc->flags = 0;
+
+ if (aPixelSize < nsFreeType2::gAntiAliasMinimum) {
+- mImageDesc.image_type |= ftc_image_mono;
+ anti_alias = PR_FALSE;
+ }
+
+- if (nsFreeType2::gFreeType2Autohinted)
+- mImageDesc.image_type |= ftc_image_flag_autohinted;
+-
+- if (nsFreeType2::gFreeType2Unhinted)
+- mImageDesc.image_type |= ftc_image_flag_unhinted;
+-
+ PRUint32 num_embedded_bitmaps, i;
+ PRInt32* embedded_bitmapheights;
+ mFaceID->GetEmbeddedBitmapHeights(&num_embedded_bitmaps,
+@@ -218,7 +211,6 @@ nsFreeTypeFont::nsFreeTypeFont(nsITrueTy
+ if (embedded_bitmapheights[i] == aPixelSize) {
+ embedded_bimap = PR_TRUE;
+ // unhinted must be set for embedded bitmaps to be used
+- mImageDesc.image_type |= ftc_image_flag_unhinted;
+ break;
+ }
+ }
+@@ -312,7 +304,7 @@ nsFreeTypeFont::doGetBoundingMetrics(con
+ if (!face)
+ return NS_ERROR_FAILURE;
+
+- FTC_Image_Cache icache;
++ FTC_ImageCache icache;
+ mFt2->GetImageCache(&icache);
+ if (!icache)
+ return NS_ERROR_FAILURE;
+@@ -401,7 +393,7 @@ nsFreeTypeFont::GetWidth(const PRUnichar
+ if (!face)
+ return 0;
+
+- FTC_Image_Cache icache;
++ FTC_ImageCache icache;
+ mFt2->GetImageCache(&icache);
+ if (!icache)
+ return 0;
+@@ -725,7 +717,7 @@ nsFreeTypeXImage::DrawString(nsRendering
+ if (y%4==0) (*blendPixelFunc)(sub_image, y, ascent-1, black, 255/2);
+ #endif
+
+- FTC_Image_Cache icache;
++ FTC_ImageCache icache;
+ mFt2->GetImageCache(&icache);
+ if (!icache)
+ return 0;