summaryrefslogtreecommitdiff
path: root/time/sunbird/patches/patch-ao
blob: bb150035ba040e5e2f54e298d764b96d4eb91e0a (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
63
64
65
66
67
68
69
70
71
72
73
74
75
$NetBSD: patch-ao,v 1.1.1.1 2006/02/05 21:56:25 ghen Exp $

--- gfx/src/x11shared/nsFontFreeType.cpp.orig	2006-02-02 17:20:47.000000000 +0100
+++ 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;
@@ -723,7 +715,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;