summaryrefslogtreecommitdiff
path: root/time/sunbird/patches/patch-ai
blob: 46dca913c5330249784bffab9022b19f8c59fa2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
$NetBSD: patch-ai,v 1.1.1.1 2006/02/05 21:56:25 ghen Exp $

--- gfx/src/ps/nsFontMetricsPS.cpp.orig	2006-02-02 16:57:57.000000000 +0100
+++ gfx/src/ps/nsFontMetricsPS.cpp
@@ -1859,10 +1859,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);
@@ -1896,7 +1896,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");
@@ -1934,8 +1934,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;
@@ -2379,16 +2379,16 @@ void nsFT2Type1Generator::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;