Magellan Linux

Annotation of /trunk/mozilla-firefox/patches/mozilla-firefox-1.0.7-libart-freetype.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 153 - (hide annotations) (download)
Tue May 8 20:52:56 2007 UTC (17 years, 1 month ago) by niro
File size: 2469 byte(s)
-import

1 niro 153 Fix libart SVG renderer building against newer freetype2
2     $NetBSD: patch-by,v 1.2 2004/07/05 14:22:42 taya Exp $
3    
4     diff -ru ../Orig/mozilla/layout/svg/renderer/src/libart/nsSVGLibartGlyphMetricsFT.cpp ./layout/svg/renderer/src/libart/nsSVGLibartGlyphMetricsFT.cpp
5     --- ../Orig/mozilla/layout/svg/renderer/src/libart/nsSVGLibartGlyphMetricsFT.cpp 2004-03-19 10:36:16.000000000 +0900
6     +++ ./layout/svg/renderer/src/libart/nsSVGLibartGlyphMetricsFT.cpp 2004-07-04 22:59:19.000000000 +0900
7     @@ -155,15 +155,15 @@
8    
9     static NS_NAMED_LITERAL_STRING(arial, "arial");
10     nsSVGLibartGlyphMetricsFT::sFontAliases.Put(NS_LITERAL_STRING("helvetica"),
11     - &arial);
12     + (nsDependentString *)&arial);
13    
14     static NS_NAMED_LITERAL_STRING(courier, "courier new");
15     nsSVGLibartGlyphMetricsFT::sFontAliases.Put(NS_LITERAL_STRING("courier"),
16     - &courier);
17     + (nsDependentString *)&courier);
18    
19     static NS_NAMED_LITERAL_STRING(times, "times new roman");
20     nsSVGLibartGlyphMetricsFT::sFontAliases.Put(NS_LITERAL_STRING("times"),
21     - &times);
22     + (nsDependentString *)&times);
23     }
24    
25     void NS_FreeSVGLibartGlyphMetricsFTGlobals()
26     @@ -440,19 +440,19 @@
27     return;
28     }
29    
30     - FTC_Image_Desc imageDesc;
31     - imageDesc.font.face_id=(void*)font_data.font_entry.get(); // XXX do we need to addref?
32     + FTC_ImageType imageDesc;
33     + imageDesc->face_id = (FTC_FaceID)font_data.font_entry.get(); // XXX do we need to addref?
34     float twipstopixel = GetTwipsToPixels();
35     float scale = GetPixelScale();
36     - imageDesc.font.pix_width = (int)((float)(font_data.font.size)*twipstopixel/scale);
37     - imageDesc.font.pix_height = (int)((float)(font_data.font.size)*twipstopixel/scale);
38     - imageDesc.image_type |= ftc_image_grays;
39     + imageDesc->width = (int)((float)(font_data.font.size)*twipstopixel/scale);
40     + imageDesc->height = (int)((float)(font_data.font.size)*twipstopixel/scale);
41     + imageDesc->flags = 0;
42    
43     // get the face
44     nsresult rv;
45     FTC_Manager mgr;
46     nsSVGLibartFreetype::ft2->GetFTCacheManager(&mgr);
47     - rv = nsSVGLibartFreetype::ft2->ManagerLookupSize(mgr, &imageDesc.font, &mFace, nsnull);
48     + rv = nsSVGLibartFreetype::ft2->ManagerLookupFace(mgr, imageDesc->face_id, &mFace);
49     NS_ASSERTION(mFace, "failed to get face/size");
50     }
51