Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 56396 Details for
Bug 89242
New ebuild for mozilla firefox with more gtk+ support (ie. file chooser)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
mozilla-firefox-1.0.2-gtk-xft-only.diff
mozilla-firefox-1.0.2-gtk-xft-only.diff (text/plain), 4.95 KB, created by
Alex Roman
on 2005-04-15 18:17:58 UTC
(
hide
)
Description:
mozilla-firefox-1.0.2-gtk-xft-only.diff
Filename:
MIME Type:
Creator:
Alex Roman
Created:
2005-04-15 18:17:58 UTC
Size:
4.95 KB
patch
obsolete
>--- gfx/src/ps/nsFontMetricsPS.cpp 2005-04-15 16:26:45.750345728 -0400 >+++ gfx/src/ps/nsFontMetricsPS.cpp 2005-04-15 16:26:34.560046912 -0400 >@@ -1029,20 +1029,6 @@ > return nsnull; > } > >-/*FT_CALLBACK_DEF*/ >-FT_Error >-nsXftFaceRequester(FTC_FaceID face_id, FT_Library lib, >- FT_Pointer request_data, FT_Face* aFace) >-{ >- nsXftEntry *faceID = (nsXftEntry *)face_id; >- >- FT_Error fterror = FT_New_Face(lib, faceID->mFontFileName.get(), >- faceID->mFaceIndex, aFace); >- if (fterror) >- *aFace = nsnull; >- return 0; >-} >- > nsFontPSXft::nsFontPSXft(const nsFont& aFont, > nsFontMetricsPS* aFontMetrics) > :nsFontPS(aFont, aFontMetrics) >@@ -1064,35 +1050,20 @@ > > 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; >- > FT_Error fterror; > fterror = FT_Init_FreeType(&mFreeTypeLibrary); > if (fterror) { >- NS_ASSERTION(!fterror, "failed to initialize FreeType library"); >+ NS_ERROR("failed to initialize FreeType library"); > mFreeTypeLibrary = nsnull; > return NS_ERROR_FAILURE; > } >- fterror = FTC_Manager_New(mFreeTypeLibrary, 0, 0, 0, nsXftFaceRequester, >- NULL, &mFTCacheManager); >- NS_ASSERTION(!fterror, "failed to create FreeType Cache manager"); >- if (fterror) >- return NS_ERROR_FAILURE; >- >- fterror = FTC_Image_Cache_New(mFTCacheManager, &mImageCache); >- NS_ASSERTION(!fterror, "failed to create FreeType image cache"); >- if (fterror) >- return NS_ERROR_FAILURE; >- > return NS_OK; > } > > nsFontPSXft::~nsFontPSXft() > { >- FTC_Manager_Done(mFTCacheManager); >+ if (mEntry->mFace) >+ FT_Done_Face(mEntry->mFace); > > if (FT_Done_FreeType(mFreeTypeLibrary)) > return; >@@ -1103,16 +1074,14 @@ > FT_Face > nsFontPSXft::getFTFace() > { >- FT_Error error; > FT_Face face = mEntry->mFace; > > if (face) > return (face); > >- error = FTC_Manager_Lookup_Size(mFTCacheManager, &mImageDesc.font, >- &face, nsnull); >- NS_ASSERTION(error == 0, "failed to get face/size"); >- if (error) >+ if (FT_New_Face(mFreeTypeLibrary, mEntry->mFontFileName.get(), >+ mEntry->mFaceIndex, &face) || >+ FT_Set_Pixel_Sizes(face, mPixelSize, 0)) > return nsnull; > > mEntry->mFace = face; >@@ -1150,15 +1119,16 @@ > if (!face) > return 0; > >+ // XXX : we might need some caching here > for (PRUint32 i=0; i<aLength; i++) { > glyph_index = FT_Get_Char_Index((FT_Face)face, aString[i]); >- FT_Error error = FTC_Image_Cache_Lookup(mImageCache, &mImageDesc, >- glyph_index, &glyph); >- if (error) { >+ if (FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT) || >+ FT_Get_Glyph(face->glyph, &glyph)) { > origin_x += FT_REG_TO_16_16(face->size->metrics.x_ppem/2 + 2); > continue; > } > origin_x += glyph->advance.x; >+ FT_Done_Glyph(glyph); > } > > NS_ENSURE_TRUE(mFontMetrics, 0); >@@ -2416,19 +2386,14 @@ > mFreeTypeLibrary = nsnull; > return NS_ERROR_FAILURE; > } >- error = FTC_Manager_New(mFreeTypeLibrary, 0, 0, 0, nsXftFaceRequester, >- NULL, &mFTCacheManager); >- NS_ASSERTION(!error, "failed to create FreeType Cache manager"); >- if (error) >- return NS_ERROR_FAILURE; > > return NS_OK; > } > > nsXftType8Generator::~nsXftType8Generator() > { >- FTC_Manager_Done(mFTCacheManager); >- >+ if (mEntry->mFace) >+ FT_Done_Face(mEntry->mFace); > if (FT_Done_FreeType(mFreeTypeLibrary)) > return; > >@@ -2437,23 +2402,15 @@ > > void nsXftType8Generator::GeneratePSFont(FILE* aFile) > { >- FT_Error error; > FT_Face face = mEntry->mFace; > > if (face == nsnull) { >- mImageDesc.font.face_id = (void*)mEntry; >- mImageDesc.font.pix_width = 16; >- mImageDesc.font.pix_height = 16; >- mImageDesc.image_type = 0; >- error = FTC_Manager_Lookup_Size(mFTCacheManager, &mImageDesc.font, >- &face, nsnull); >- if (error) >+ if (FT_New_Face(mFreeTypeLibrary, mEntry->mFontFileName.get(), mEntry->mFaceIndex, &face) || >+ face == nsnull /* || FT_Set_Pixel_Sizes(face, 16, 0) */) > return; >+ mEntry->mFace = face; > } > >- if (face == nsnull) >- return; >- > int wmode = 0; > if (!mSubset.IsEmpty()) > FT2SubsetToType8(face, mSubset.get(), mSubset.Length(), wmode, aFile); >--- gfx/src/ps/nsFontMetricsPS.h 2005-04-15 16:26:41.654968320 -0400 >+++ gfx/src/ps/nsFontMetricsPS.h 2005-04-15 16:26:37.313628304 -0400 >@@ -342,10 +342,7 @@ > > protected: > PRUint16 mPixelSize; >- FTC_Image_Desc mImageDesc; > FT_Library mFreeTypeLibrary; >- FTC_Manager mFTCacheManager; >- FTC_Image_Cache mImageCache; > > int ascent(); > int descent(); >@@ -480,9 +477,7 @@ > > protected: > nsXftEntry *mEntry; >- FTC_Image_Desc mImageDesc; > FT_Library mFreeTypeLibrary; >- FTC_Manager mFTCacheManager; > }; > #else > #ifdef MOZ_ENABLE_FREETYPE2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 89242
:
56394
|
56395
| 56396