update base pkgs..
[vuplus_openvuplus] / meta-openvuplus / recipes-base / tuxcom / tuxbox-tuxcom-32bpp / support_newer_freetype.diff
1 diff -Naur tuxcom/tuxcom.c tuxcom.freetype/tuxcom.c
2 --- tuxcom/tuxcom.c     2009-01-06 01:21:26.000000000 +0100
3 +++ tuxcom.freetype/tuxcom.c    2009-01-07 13:21:16.000000000 +0100
4 @@ -322,9 +322,15 @@
5  
6                 switch (size)
7                 {
8 +#if ((defined(FREETYPE_MAJOR)) && (((FREETYPE_MAJOR == 2) && (((FREETYPE_MINOR == 1) && (FREETYPE_PATCH >= 9)) || (FREETYPE_MINOR > 1))) || (FREETYPE_MAJOR > 2)))
9 +                       case VERY_SMALL: desc.width = desc.height = FONTHEIGHT_VERY_SMALL; break;
10 +                       case SMALL     : desc.width = desc.height = FONTHEIGHT_SMALL     ; break;
11 +                       case BIG       : desc.width = desc.height = FONTHEIGHT_BIG       ; break;
12 +#else
13                         case VERY_SMALL: desc.font.pix_width = desc.font.pix_height = FONTHEIGHT_VERY_SMALL; break;
14                         case SMALL     : desc.font.pix_width = desc.font.pix_height = FONTHEIGHT_SMALL     ; break;
15                     case BIG       : desc.font.pix_width = desc.font.pix_height = FONTHEIGHT_BIG       ; break;
16 +#endif
17                 }
18  
19         //reset kerning
20 @@ -354,9 +360,15 @@
21  
22                 switch (size)
23                 {
24 +#if ((defined(FREETYPE_MAJOR)) && (((FREETYPE_MAJOR == 2) && (((FREETYPE_MINOR == 1) && (FREETYPE_PATCH >= 9)) || (FREETYPE_MINOR > 1))) || (FREETYPE_MAJOR > 2)))
25 +                       case VERY_SMALL: desc.width = desc.height = FONTHEIGHT_VERY_SMALL; break;
26 +                       case SMALL     : desc.width = desc.height = FONTHEIGHT_SMALL     ; break;
27 +                       case BIG       : desc.width = desc.height = FONTHEIGHT_BIG       ; break;
28 +#else
29                         case VERY_SMALL: desc.font.pix_width = desc.font.pix_height = FONTHEIGHT_VERY_SMALL; break;
30                         case SMALL     : desc.font.pix_width = desc.font.pix_height = FONTHEIGHT_SMALL     ; break;
31                     case BIG       : desc.font.pix_width = desc.font.pix_height = FONTHEIGHT_BIG       ; break;
32 +#endif
33                 }
34  
35         //set alignment
36 @@ -617,17 +629,26 @@
37                         return;
38                 }
39                 else
40 +#if ((defined(FREETYPE_MAJOR)) && (((FREETYPE_MAJOR == 2) && (((FREETYPE_MINOR == 1) && (FREETYPE_PATCH >= 9)) || (FREETYPE_MINOR > 1))) || (FREETYPE_MAJOR > 2)))
41 +                       desc.face_id = FONT2;
42 +#else
43                         desc.font.face_id = FONT2;
44 +#endif
45         }
46         else
47 +#if ((defined(FREETYPE_MAJOR)) && (((FREETYPE_MAJOR == 2) && (((FREETYPE_MINOR == 1) && (FREETYPE_PATCH >= 9)) || (FREETYPE_MINOR > 1))) || (FREETYPE_MAJOR > 2)))
48 +               desc.face_id = FONT;
49 +#else
50                 desc.font.face_id = FONT;
51 -
52 +#endif
53  
54         use_kerning = FT_HAS_KERNING(face);
55  
56 -
57 +#if ((defined(FREETYPE_MAJOR)) && (((FREETYPE_MAJOR == 2) && (((FREETYPE_MINOR == 1) && (FREETYPE_PATCH >= 9)) || (FREETYPE_MINOR > 1))) || (FREETYPE_MAJOR > 2)))
58 +       desc.flags = FT_LOAD_MONOCHROME;
59 +#else
60         desc.image_type = ftc_image_mono;
61 -
62 +#endif
63  
64  
65         //init backbuffer
66 diff -Naur tuxcom/tuxcom.h tuxcom.freetype/tuxcom.h
67 --- tuxcom/tuxcom.h     2009-01-06 01:21:26.000000000 +0100
68 +++ tuxcom.freetype/tuxcom.h    2009-01-07 13:21:16.000000000 +0100
69 @@ -192,6 +192,9 @@
70  
71  
72  //freetype stuff
73 +#if ((defined(FREETYPE_MAJOR)) && (((FREETYPE_MAJOR == 2) && (((FREETYPE_MINOR == 1) && (FREETYPE_PATCH >= 9)) || (FREETYPE_MINOR > 1))) || (FREETYPE_MAJOR > 2)))
74 +typedef FTC_ImageTypeRec FTC_Image_Desc;
75 +#endif
76  
77  //#define FONT "/usr/share/fonts/md_khmurabi_10.ttf"
78  #define FONT "/usr/share/fonts/pakenham.ttf"