blob: 5ed9eca47224ec36fc392a520aea5dbc18ee154b (
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
76
77
78
|
diff -Naur tuxcom/tuxcom.c tuxcom.freetype/tuxcom.c
--- tuxcom/tuxcom.c 2009-01-06 01:21:26.000000000 +0100
+++ tuxcom.freetype/tuxcom.c 2009-01-07 13:21:16.000000000 +0100
@@ -322,9 +322,15 @@
switch (size)
{
+#if ((defined(FREETYPE_MAJOR)) && (((FREETYPE_MAJOR == 2) && (((FREETYPE_MINOR == 1) && (FREETYPE_PATCH >= 9)) || (FREETYPE_MINOR > 1))) || (FREETYPE_MAJOR > 2)))
+ case VERY_SMALL: desc.width = desc.height = FONTHEIGHT_VERY_SMALL; break;
+ case SMALL : desc.width = desc.height = FONTHEIGHT_SMALL ; break;
+ case BIG : desc.width = desc.height = FONTHEIGHT_BIG ; break;
+#else
case VERY_SMALL: desc.font.pix_width = desc.font.pix_height = FONTHEIGHT_VERY_SMALL; break;
case SMALL : desc.font.pix_width = desc.font.pix_height = FONTHEIGHT_SMALL ; break;
case BIG : desc.font.pix_width = desc.font.pix_height = FONTHEIGHT_BIG ; break;
+#endif
}
//reset kerning
@@ -354,9 +360,15 @@
switch (size)
{
+#if ((defined(FREETYPE_MAJOR)) && (((FREETYPE_MAJOR == 2) && (((FREETYPE_MINOR == 1) && (FREETYPE_PATCH >= 9)) || (FREETYPE_MINOR > 1))) || (FREETYPE_MAJOR > 2)))
+ case VERY_SMALL: desc.width = desc.height = FONTHEIGHT_VERY_SMALL; break;
+ case SMALL : desc.width = desc.height = FONTHEIGHT_SMALL ; break;
+ case BIG : desc.width = desc.height = FONTHEIGHT_BIG ; break;
+#else
case VERY_SMALL: desc.font.pix_width = desc.font.pix_height = FONTHEIGHT_VERY_SMALL; break;
case SMALL : desc.font.pix_width = desc.font.pix_height = FONTHEIGHT_SMALL ; break;
case BIG : desc.font.pix_width = desc.font.pix_height = FONTHEIGHT_BIG ; break;
+#endif
}
//set alignment
@@ -617,17 +629,26 @@
return;
}
else
+#if ((defined(FREETYPE_MAJOR)) && (((FREETYPE_MAJOR == 2) && (((FREETYPE_MINOR == 1) && (FREETYPE_PATCH >= 9)) || (FREETYPE_MINOR > 1))) || (FREETYPE_MAJOR > 2)))
+ desc.face_id = FONT2;
+#else
desc.font.face_id = FONT2;
+#endif
}
else
+#if ((defined(FREETYPE_MAJOR)) && (((FREETYPE_MAJOR == 2) && (((FREETYPE_MINOR == 1) && (FREETYPE_PATCH >= 9)) || (FREETYPE_MINOR > 1))) || (FREETYPE_MAJOR > 2)))
+ desc.face_id = FONT;
+#else
desc.font.face_id = FONT;
-
+#endif
use_kerning = FT_HAS_KERNING(face);
-
+#if ((defined(FREETYPE_MAJOR)) && (((FREETYPE_MAJOR == 2) && (((FREETYPE_MINOR == 1) && (FREETYPE_PATCH >= 9)) || (FREETYPE_MINOR > 1))) || (FREETYPE_MAJOR > 2)))
+ desc.flags = FT_LOAD_MONOCHROME;
+#else
desc.image_type = ftc_image_mono;
-
+#endif
//init backbuffer
diff -Naur tuxcom/tuxcom.h tuxcom.freetype/tuxcom.h
--- tuxcom/tuxcom.h 2009-01-06 01:21:26.000000000 +0100
+++ tuxcom.freetype/tuxcom.h 2009-01-07 13:21:16.000000000 +0100
@@ -192,6 +192,9 @@
//freetype stuff
+#if ((defined(FREETYPE_MAJOR)) && (((FREETYPE_MAJOR == 2) && (((FREETYPE_MINOR == 1) && (FREETYPE_PATCH >= 9)) || (FREETYPE_MINOR > 1))) || (FREETYPE_MAJOR > 2)))
+typedef FTC_ImageTypeRec FTC_Image_Desc;
+#endif
//#define FONT "/usr/share/fonts/md_khmurabi_10.ttf"
#define FONT "/usr/share/fonts/pakenham.ttf"
|