Index: trunk/extensions/WebFonts/WebFonts.config.php |
— | — | @@ -5,35 +5,35 @@ |
6 | 6 | * @file |
7 | 7 | * @ingroup Extensions |
8 | 8 | */ |
9 | | -$fontsPath = "$wgScriptPath/extensions/WebFonts/fonts"; |
10 | 9 | $wgWebFonts = array( |
| 10 | + 'basepath' => "$wgScriptPath/extensions/WebFonts/fonts/", |
11 | 11 | 'fonts' => array( |
12 | 12 | 'RufScript' => array( |
13 | | - 'eot' => "$fontsPath/en/Rufscript.eot", |
14 | | - 'ttf' => "$fontsPath/en/Rufscript.ttf", |
15 | | - 'woff' => "$fontsPath/en/Rufscript.woff", |
| 13 | + 'eot' => "en/Rufscript.eot", |
| 14 | + 'ttf' => "en/Rufscript.ttf", |
| 15 | + 'woff' => "en/Rufscript.woff", |
16 | 16 | ), |
17 | 17 | |
18 | 18 | 'Perizia' => array( |
19 | | - 'eot' => "$fontsPath/en/Perizia.eot", |
20 | | - 'ttf' => "$fontsPath/en/Perizia.ttf", |
21 | | - 'woff' => "$fontsPath/en/Perizia.woff", |
| 19 | + 'eot' => "en/Perizia.eot", |
| 20 | + 'ttf' => "en/Perizia.ttf", |
| 21 | + 'woff' => "en/Perizia.woff", |
22 | 22 | ), |
23 | 23 | 'Ubuntu' => array( |
24 | | - 'eot' => "$fontsPath/en/ubuntu-r-webfont.eot", |
25 | | - 'ttf' => "$fontsPath/en/ubuntu-r.ttf", |
26 | | - 'woff' => "$fontsPath/en/ubuntu-r-webfont.woff", |
27 | | - 'svg' => "$fontsPath/en/ubuntu-r-webfont.svg", |
| 24 | + 'eot' => "en/ubuntu-r-webfont.eot", |
| 25 | + 'ttf' => "en/ubuntu-r.ttf", |
| 26 | + 'woff' => "en/ubuntu-r-webfont.woff", |
| 27 | + 'svg' => "en/ubuntu-r-webfont.svg", |
28 | 28 | ), |
29 | | - 'AnjaliOldLipi' => array( |
30 | | - 'eot' => "$fontsPath/ml/AnjaliOldLipi.eot", |
31 | | - 'ttf' => "$fontsPath/ml/AnjaliOldLipi.ttf", |
32 | | - 'woff' => "$fontsPath/ml/AnjaliOldLipi.woff", |
| 29 | + 'AnjaliOldLipi' => array( |
| 30 | + 'eot' => "ml/AnjaliOldLipi.eot", |
| 31 | + 'ttf' => "ml/AnjaliOldLipi.ttf", |
| 32 | + 'woff' => "ml/AnjaliOldLipi.woff", |
33 | 33 | ), |
34 | 34 | 'Meera' => array( |
35 | | - 'eot' => "$fontsPath/ml/Meera.eot", |
36 | | - 'ttf' => "$fontsPath/ml/Meera.ttf", |
37 | | - 'woff' => "$fontsPath/ml/Meera.woff", |
| 35 | + 'eot' => "ml/Meera.eot", |
| 36 | + 'ttf' => "ml/Meera.ttf", |
| 37 | + 'woff' => "ml/Meera.woff", |
38 | 38 | 'scale' => 1.5, |
39 | 39 | 'normalization' => array( |
40 | 40 | "ൾ" => "ള്", |
— | — | @@ -48,9 +48,9 @@ |
49 | 49 | ), |
50 | 50 | |
51 | 51 | 'Rachana' => array( |
52 | | - 'eot' => "$fontsPath/ml/Rachana.eot", |
53 | | - 'ttf' => "$fontsPath/ml/Rachana.ttf", |
54 | | - 'woff' => "$fontsPath/ml/Rachana.woff", |
| 52 | + 'eot' => "ml/Rachana.eot", |
| 53 | + 'ttf' => "ml/Rachana.ttf", |
| 54 | + 'woff' => "ml/Rachana.woff", |
55 | 55 | 'normalization' => array( |
56 | 56 | "ൾ" => "ള്", |
57 | 57 | "ൻ" => "ന്", |
— | — | @@ -63,9 +63,9 @@ |
64 | 64 | ) |
65 | 65 | ), |
66 | 66 | 'RaghuMalayalam' => array( |
67 | | - 'eot' => "$fontsPath/ml/RaghuMalayalam.eot", |
68 | | - 'ttf' => "$fontsPath/ml/RaghuMalayalam.ttf", |
69 | | - 'woff' => "$fontsPath/ml/RaghuMalayalam.woff", |
| 67 | + 'eot' => "ml/RaghuMalayalam.eot", |
| 68 | + 'ttf' => "ml/RaghuMalayalam.ttf", |
| 69 | + 'woff' => "ml/RaghuMalayalam.woff", |
70 | 70 | 'normalization' => array( |
71 | 71 | "ൾ" => "ള്", |
72 | 72 | "ൻ" => "ന്", |
— | — | @@ -78,148 +78,148 @@ |
79 | 79 | ) |
80 | 80 | ), |
81 | 81 | 'Lohit Oriya' => array( |
82 | | - 'eot' => "$fontsPath/or/Lohit-Oriya.eot", |
83 | | - 'ttf' => "$fontsPath/or/Lohit-Oriya.ttf", |
84 | | - 'woff' => "$fontsPath/or/Lohit-Oriya.woff", |
| 82 | + 'eot' => "or/Lohit-Oriya.eot", |
| 83 | + 'ttf' => "or/Lohit-Oriya.ttf", |
| 84 | + 'woff' => "or/Lohit-Oriya.woff", |
85 | 85 | ), |
86 | 86 | 'Lohit Tamil' => array( |
87 | | - 'eot' => "$fontsPath/ta/Lohit-Tamil.eot", |
88 | | - 'ttf' => "$fontsPath/ta/Lohit-Tamil.ttf", |
89 | | - 'woff' => "$fontsPath/ta/Lohit-Tamil.woff", |
| 87 | + 'eot' => "ta/Lohit-Tamil.eot", |
| 88 | + 'ttf' => "ta/Lohit-Tamil.ttf", |
| 89 | + 'woff' => "ta/Lohit-Tamil.woff", |
90 | 90 | ), |
91 | 91 | 'Lohit Telugu' => array( |
92 | | - 'eot' => "$fontsPath/te/LohitTelugu.eot", |
93 | | - 'ttf' => "$fontsPath/te/LohitTelugu.ttf", |
94 | | - 'woff' => "$fontsPath/te/LohitTelugu.woff", |
| 92 | + 'eot' => "te/LohitTelugu.eot", |
| 93 | + 'ttf' => "te/LohitTelugu.ttf", |
| 94 | + 'woff' => "te/LohitTelugu.woff", |
95 | 95 | ), |
96 | 96 | 'Lohit Bengali' => array( |
97 | | - 'eot' => "$fontsPath/bn/LohitBengali.eot", |
98 | | - 'ttf' => "$fontsPath/bn/LohitBengali.ttf", |
99 | | - 'woff' => "$fontsPath/bn/LohitBengali.woff", |
| 97 | + 'eot' => "bn/LohitBengali.eot", |
| 98 | + 'ttf' => "bn/LohitBengali.ttf", |
| 99 | + 'woff' => "bn/LohitBengali.woff", |
100 | 100 | ), |
101 | 101 | 'Samyak Gujarati' => array( |
102 | | - 'eot' => "$fontsPath/gu/SamyakGujarati.eot", |
103 | | - 'ttf' => "$fontsPath/gu/SamyakGujarati.ttf", |
104 | | - 'woff' => "$fontsPath/gu/SamyakGujarati.woff", |
| 102 | + 'eot' => "gu/SamyakGujarati.eot", |
| 103 | + 'ttf' => "gu/SamyakGujarati.ttf", |
| 104 | + 'woff' => "gu/SamyakGujarati.woff", |
105 | 105 | ), |
106 | 106 | 'Lohit Hindi' => array( |
107 | | - 'eot' => "$fontsPath/hi/LohitHindi.eot", |
108 | | - 'ttf' => "$fontsPath/hi/LohitHindi.ttf", |
109 | | - 'woff' => "$fontsPath/hi/LohitHindi.woff", |
| 107 | + 'eot' => "hi/LohitHindi.eot", |
| 108 | + 'ttf' => "hi/LohitHindi.ttf", |
| 109 | + 'woff' => "hi/LohitHindi.woff", |
110 | 110 | ), |
111 | 111 | 'Samyak Devanagari' => array( |
112 | | - 'eot' => "$fontsPath/hi/SamyakDevanagari.eot", |
113 | | - 'ttf' => "$fontsPath/hi/SamyakDevanagari.ttf", |
114 | | - 'woff' => "$fontsPath/hi/SamyakDevanagari.woff", |
| 112 | + 'eot' => "hi/SamyakDevanagari.eot", |
| 113 | + 'ttf' => "hi/SamyakDevanagari.ttf", |
| 114 | + 'woff' => "hi/SamyakDevanagari.woff", |
115 | 115 | ), |
116 | 116 | 'Miriam CLM' => array( |
117 | | - 'eot' => "$fontsPath/he/MiriamCLM-Book.eot", |
118 | | - 'ttf' => "$fontsPath/he/MiriamCLM-Book.ttf", |
119 | | - 'woff' => "$fontsPath/he/MiriamCLM-Book.woff", |
| 117 | + 'eot' => "he/MiriamCLM-Book.eot", |
| 118 | + 'ttf' => "he/MiriamCLM-Book.ttf", |
| 119 | + 'woff' => "he/MiriamCLM-Book.woff", |
120 | 120 | ), |
121 | 121 | 'Taamey Frank CLM' => array( |
122 | | - 'eot' => "$fontsPath/he/TaameyFrankCLM.eot", |
123 | | - 'ttf' => "$fontsPath/he/TaameyFrankCLM.ttf", |
124 | | - 'woff' => "$fontsPath/he/TaameyFrankCLM.woff", |
125 | | - 'svg' => "$fontsPath/he/TaameyFrankCLM.svg", |
| 122 | + 'eot' => "he/TaameyFrankCLM.eot", |
| 123 | + 'ttf' => "he/TaameyFrankCLM.ttf", |
| 124 | + 'woff' => "he/TaameyFrankCLM.woff", |
| 125 | + 'svg' => "he/TaameyFrankCLM.svg", |
126 | 126 | ), |
127 | 127 | 'Kedage' => array( |
128 | | - 'eot' => "$fontsPath/kn/Kedage.eot", |
129 | | - 'ttf' => "$fontsPath/kn/Kedage.ttf", |
130 | | - 'woff' => "$fontsPath/kn/Kedage.woff", |
| 128 | + 'eot' => "kn/Kedage.eot", |
| 129 | + 'ttf' => "kn/Kedage.ttf", |
| 130 | + 'woff' => "kn/Kedage.woff", |
131 | 131 | ), |
132 | 132 | 'Lohit Kannada' => array( |
133 | | - 'eot' => "$fontsPath/kn/LohitKannada.eot", |
134 | | - 'ttf' => "$fontsPath/kn/LohitKannada.ttf", |
135 | | - 'woff' => "$fontsPath/kn/LohitKannada.woff", |
| 133 | + 'eot' => "kn/LohitKannada.eot", |
| 134 | + 'ttf' => "kn/LohitKannada.ttf", |
| 135 | + 'woff' => "kn/LohitKannada.woff", |
136 | 136 | ), |
137 | 137 | 'Masterpiece Uni Sans' => array( |
138 | | - 'eot' => "$fontsPath/my/MasterpieceUniSans.eot", |
139 | | - 'ttf' => "$fontsPath/my/MasterpieceUniSans.ttf", |
140 | | - 'woff' => "$fontsPath/my/MasterpieceUniSans.woff", |
141 | | - 'svg' => "$fontsPath/my/MasterpieceUniSans.svg", |
| 138 | + 'eot' => "my/MasterpieceUniSans.eot", |
| 139 | + 'ttf' => "my/MasterpieceUniSans.ttf", |
| 140 | + 'woff' => "my/MasterpieceUniSans.woff", |
| 141 | + 'svg' => "my/MasterpieceUniSans.svg", |
142 | 142 | ), |
143 | 143 | 'Padauk-Regular' => array( |
144 | | - 'eot' => "$fontsPath/my/Padauk-Regular.eot", |
145 | | - 'ttf' => "$fontsPath/my/Padauk-Regular.ttf", |
146 | | - 'woff' => "$fontsPath/my/Padauk-Regular.woff", |
147 | | - 'svg' => "$fontsPath/my/Padauk-Regular.svg", |
| 144 | + 'eot' => "my/Padauk-Regular.eot", |
| 145 | + 'ttf' => "my/Padauk-Regular.ttf", |
| 146 | + 'woff' => "my/Padauk-Regular.woff", |
| 147 | + 'svg' => "my/Padauk-Regular.svg", |
148 | 148 | ), |
149 | 149 | 'Myanmar3' => array( |
150 | | - 'eot' => "$fontsPath/my/Myanmar3.eot", |
151 | | - 'ttf' => "$fontsPath/my/Myanmar3.ttf", |
152 | | - 'woff' => "$fontsPath/my/Myanmar3.woff", |
153 | | - 'svg' => "$fontsPath/my/Myanmar3.svg", |
| 150 | + 'eot' => "my/Myanmar3.eot", |
| 151 | + 'ttf' => "my/Myanmar3.ttf", |
| 152 | + 'woff' => "my/Myanmar3.woff", |
| 153 | + 'svg' => "my/Myanmar3.svg", |
154 | 154 | ), |
155 | 155 | 'Yunghkio' => array( |
156 | | - 'eot' => "$fontsPath/my/Yunghkio.eot", |
157 | | - 'ttf' => "$fontsPath/my/Yunghkio.ttf", |
158 | | - 'woff' => "$fontsPath/my/Yunghkio.woff", |
159 | | - 'svg' => "$fontsPath/my/Yunghkio.svg", |
| 156 | + 'eot' => "my/Yunghkio.eot", |
| 157 | + 'ttf' => "my/Yunghkio.ttf", |
| 158 | + 'woff' => "my/Yunghkio.woff", |
| 159 | + 'svg' => "my/Yunghkio.svg", |
160 | 160 | ), |
161 | 161 | 'KhmerOSbattambang' => array( |
162 | | - 'eot' => "$fontsPath/km/KhmerOSbattambang.eot", |
163 | | - 'ttf' => "$fontsPath/km/KhmerOSbattambang.ttf", |
164 | | - 'woff' => "$fontsPath/km/KhmerOSbattambang.woff", |
165 | | - 'svg' => "$fontsPath/km/KhmerOSbattambang.svg", |
| 162 | + 'eot' => "km/KhmerOSbattambang.eot", |
| 163 | + 'ttf' => "km/KhmerOSbattambang.ttf", |
| 164 | + 'woff' => "km/KhmerOSbattambang.woff", |
| 165 | + 'svg' => "km/KhmerOSbattambang.svg", |
166 | 166 | ), |
167 | 167 | 'KhmerOSbokor' => array( |
168 | | - 'eot' => "$fontsPath/km/KhmerOSbokor.eot", |
169 | | - 'ttf' => "$fontsPath/km/KhmerOSbokor.ttf", |
170 | | - 'woff' => "$fontsPath/km/KhmerOSbokor.woff", |
171 | | - 'svg' => "$fontsPath/km/KhmerOSbokor.svg", |
| 168 | + 'eot' => "km/KhmerOSbokor.eot", |
| 169 | + 'ttf' => "km/KhmerOSbokor.ttf", |
| 170 | + 'woff' => "km/KhmerOSbokor.woff", |
| 171 | + 'svg' => "km/KhmerOSbokor.svg", |
172 | 172 | ), |
173 | 173 | 'KhmerOS' => array( |
174 | | - 'eot' => "$fontsPath/km/KhmerOS.eot", |
175 | | - 'ttf' => "$fontsPath/km/KhmerOS.ttf", |
176 | | - 'woff' => "$fontsPath/km/KhmerOS.woff", |
177 | | - 'svg' => "$fontsPath/km/KhmerOS.svg", |
| 174 | + 'eot' => "km/KhmerOS.eot", |
| 175 | + 'ttf' => "km/KhmerOS.ttf", |
| 176 | + 'woff' => "km/KhmerOS.woff", |
| 177 | + 'svg' => "km/KhmerOS.svg", |
178 | 178 | ), |
179 | 179 | 'KhmerOSsiemreap' => array( |
180 | | - 'eot' => "$fontsPath/km/KhmerOSsiemreap.eot", |
181 | | - 'ttf' => "$fontsPath/km/KhmerOSsiemreap.ttf", |
182 | | - 'woff' => "$fontsPath/km/KhmerOSsiemreap.woff", |
183 | | - 'svg' => "$fontsPath/km/KhmerOSsiemreap.svg", |
| 180 | + 'eot' => "km/KhmerOSsiemreap.eot", |
| 181 | + 'ttf' => "km/KhmerOSsiemreap.ttf", |
| 182 | + 'woff' => "km/KhmerOSsiemreap.woff", |
| 183 | + 'svg' => "km/KhmerOSsiemreap.svg", |
184 | 184 | ), |
185 | 185 | 'KhmerOSmuollight' => array( |
186 | | - 'eot' => "$fontsPath/km/KhmerOSmuollight.eot", |
187 | | - 'ttf' => "$fontsPath/km/KhmerOSmuollight.ttf", |
188 | | - 'woff' => "$fontsPath/km/KhmerOSmuollight.woff", |
189 | | - 'svg' => "$fontsPath/km/KhmerOSmuollight.svg", |
| 186 | + 'eot' => "km/KhmerOSmuollight.eot", |
| 187 | + 'ttf' => "km/KhmerOSmuollight.ttf", |
| 188 | + 'woff' => "km/KhmerOSmuollight.woff", |
| 189 | + 'svg' => "km/KhmerOSmuollight.svg", |
190 | 190 | ), |
191 | 191 | 'KhmerOSmuol' => array( |
192 | | - 'eot' => "$fontsPath/km/KhmerOSmuol.eot", |
193 | | - 'ttf' => "$fontsPath/km/KhmerOSmuol.ttf", |
194 | | - 'woff' => "$fontsPath/km/KhmerOSmuol.woff", |
195 | | - 'svg' => "$fontsPath/km/KhmerOSmuol.svg", |
| 192 | + 'eot' => "km/KhmerOSmuol.eot", |
| 193 | + 'ttf' => "km/KhmerOSmuol.ttf", |
| 194 | + 'woff' => "km/KhmerOSmuol.woff", |
| 195 | + 'svg' => "km/KhmerOSmuol.svg", |
196 | 196 | ), |
197 | 197 | 'KhmerOSmuolpali' => array( |
198 | | - 'eot' => "$fontsPath/km/KhmerOSmuolpali.eot", |
199 | | - 'ttf' => "$fontsPath/km/KhmerOSmuolpali.ttf", |
200 | | - 'woff' => "$fontsPath/km/KhmerOSmuolpali.woff", |
201 | | - 'svg' => "$fontsPath/km/KhmerOSmuolpali.svg", |
| 198 | + 'eot' => "km/KhmerOSmuolpali.eot", |
| 199 | + 'ttf' => "km/KhmerOSmuolpali.ttf", |
| 200 | + 'woff' => "km/KhmerOSmuolpali.woff", |
| 201 | + 'svg' => "km/KhmerOSmuolpali.svg", |
202 | 202 | ), |
203 | 203 | 'KhmerOSfreehand' => array( |
204 | | - 'eot' => "$fontsPath/km/KhmerOSfreehand.eot", |
205 | | - 'ttf' => "$fontsPath/km/KhmerOSfreehand.ttf", |
206 | | - 'woff' => "$fontsPath/km/KhmerOSfreehand.woff", |
207 | | - 'svg' => "$fontsPath/km/KhmerOSfreehand.svg", |
| 204 | + 'eot' => "km/KhmerOSfreehand.eot", |
| 205 | + 'ttf' => "km/KhmerOSfreehand.ttf", |
| 206 | + 'woff' => "km/KhmerOSfreehand.woff", |
| 207 | + 'svg' => "km/KhmerOSfreehand.svg", |
208 | 208 | ), |
209 | 209 | 'KhmerOSfasthand' => array( |
210 | | - 'eot' => "$fontsPath/km/KhmerOSfasthand.eot", |
211 | | - 'ttf' => "$fontsPath/km/KhmerOSfasthand.ttf", |
212 | | - 'woff' => "$fontsPath/km/KhmerOSfasthand.woff", |
213 | | - 'svg' => "$fontsPath/km/KhmerOSfasthand.svg", |
| 210 | + 'eot' => "km/KhmerOSfasthand.eot", |
| 211 | + 'ttf' => "km/KhmerOSfasthand.ttf", |
| 212 | + 'woff' => "km/KhmerOSfasthand.woff", |
| 213 | + 'svg' => "km/KhmerOSfasthand.svg", |
214 | 214 | ), |
215 | 215 | 'Pagul' => array( |
216 | | - 'eot' => "$fontsPath/saz/Pagul.eot", |
217 | | - 'ttf' => "$fontsPath/saz/Pagul.ttf", |
218 | | - 'woff' => "$fontsPath/saz/Pagul.woff", |
| 216 | + 'eot' => "saz/Pagul.eot", |
| 217 | + 'ttf' => "saz/Pagul.ttf", |
| 218 | + 'woff' => "saz/Pagul.woff", |
219 | 219 | ), |
220 | 220 | 'AbyssinicaSIL'=> array( |
221 | | - 'eot' => "$fontsPath/gez/AbyssinicaSIL-R.eot", |
222 | | - 'ttf' => "$fontsPath/gez/AbyssinicaSIL-R.ttf", |
223 | | - 'woff' => "$fontsPath/gez/AbyssinicaSIL-R.woff", |
| 221 | + 'eot' => "gez/AbyssinicaSIL-R.eot", |
| 222 | + 'ttf' => "gez/AbyssinicaSIL-R.ttf", |
| 223 | + 'woff' => "gez/AbyssinicaSIL-R.woff", |
224 | 224 | ), |
225 | 225 | ), |
226 | 226 | |
Index: trunk/extensions/WebFonts/js/webfonts.js |
— | — | @@ -108,23 +108,24 @@ |
109 | 109 | */ |
110 | 110 | loadcss: function(fontfamily){ |
111 | 111 | var fontconfig = $.webfonts.config.fonts[fontfamily]; |
| 112 | + var base = $.webfonts.config.basepath; |
112 | 113 | var styleString = |
113 | 114 | "<style type='text/css'>\n@font-face {\n" |
114 | 115 | + "\tfont-family: '"+fontfamily+"';\n"; |
115 | 116 | if ( 'eot' in fontconfig ) { |
116 | | - styleString += "\tsrc: url('"+fontconfig.eot+"');\n"; |
| 117 | + styleString += "\tsrc: url('"+base+fontconfig.eot+"');\n"; |
117 | 118 | } |
118 | 119 | //If the font is present locally, use it. |
119 | 120 | styleString += "\tsrc: local('"+ fontfamily +"'),"; |
120 | 121 | |
121 | 122 | if ( 'woff' in fontconfig ) { |
122 | | - styleString += "\t\turl('"+fontconfig.woff+"') format('woff'),"; |
| 123 | + styleString += "\t\turl('"+base+fontconfig.woff+"') format('woff'),"; |
123 | 124 | } |
124 | 125 | if ( 'svg' in fontconfig ) { |
125 | | - styleString += "\t\turl('"+fontconfig.svg+"#"+fontfamily+"') format('svg'),"; |
| 126 | + styleString += "\t\turl('"+base+fontconfig.svg+"#"+fontfamily+"') format('svg'),"; |
126 | 127 | } |
127 | 128 | if ( 'ttf' in fontconfig ) { |
128 | | - styleString += "\t\turl('"+fontconfig.ttf+"') format('truetype');\n"; |
| 129 | + styleString += "\t\turl('"+base+fontconfig.ttf+"') format('truetype');\n"; |
129 | 130 | } |
130 | 131 | |
131 | 132 | styleString += "\tfont-weight: normal;\n}\n</style>\n"; |