Rev 4364 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4364 | Rev 5043 | ||
---|---|---|---|
Line 39... | Line 39... | ||
39 | /* glyph cache minimum size */ |
39 | /* glyph cache minimum size */ |
40 | #define CACHE_MIN_SIZE (100 * 1024) |
40 | #define CACHE_MIN_SIZE (100 * 1024) |
Line 41... | Line 41... | ||
41 | 41 | ||
Line -... | Line 42... | ||
- | 42 | #define BOLD_WEIGHT 700 |
|
- | 43 | ||
- | 44 | #ifdef DBG |
|
- | 45 | #undef DBG |
|
- | 46 | #endif |
|
- | 47 | //#define DBG(s) __menuet__debug_out(s) /* For the debug messages in BOARD */ |
|
42 | #define BOLD_WEIGHT 700 |
48 | #define DBG(s) LOG((s)) /* So that we see debug in Netsurf's LOG files */ |
43 | 49 | ||
44 | static FT_Library library; |
50 | static FT_Library library; |
45 | static FTC_Manager ft_cmanager; |
51 | static FTC_Manager ft_cmanager; |
Line 195... | Line 201... | ||
195 | if (max_cache_size < CACHE_MIN_SIZE) { |
201 | if (max_cache_size < CACHE_MIN_SIZE) { |
196 | max_cache_size = CACHE_MIN_SIZE; |
202 | max_cache_size = CACHE_MIN_SIZE; |
197 | } |
203 | } |
Line 198... | Line 204... | ||
198 | 204 | ||
199 | LOG(("Freetype cache...")); |
205 | LOG(("Freetype cache...")); |
200 | __menuet__debug_out("Ft cache\n"); |
206 | DBG("Ft cache\n"); |
201 | /* cache manager initialise */ |
207 | /* cache manager initialise */ |
202 | error = FTC_Manager_New(library, |
208 | error = FTC_Manager_New(library, |
203 | max_faces, |
209 | max_faces, |
204 | 0, |
210 | 0, |
Line 212... | Line 218... | ||
212 | return false; |
218 | return false; |
213 | } |
219 | } |
Line 214... | Line 220... | ||
214 | 220 | ||
215 | 221 | ||
216 | LOG(("Freetype map cache...")); |
222 | LOG(("Freetype map cache...")); |
Line 217... | Line 223... | ||
217 | __menuet__debug_out("Ft map cache\n"); |
223 | DBG("Ft map cache\n"); |
Line 218... | Line 224... | ||
218 | error = FTC_CMapCache_New(ft_cmanager, &ft_cmap_cache); |
224 | error = FTC_CMapCache_New(ft_cmanager, &ft_cmap_cache); |
Line 219... | Line 225... | ||
219 | 225 | ||
220 | error = FTC_ImageCache_New(ft_cmanager, &ft_image_cache); |
226 | error = FTC_ImageCache_New(ft_cmanager, &ft_image_cache); |
Line 221... | Line 227... | ||
221 | 227 | ||
222 | /* need to obtain the generic font faces */ |
228 | /* need to obtain the generic font faces */ |
223 | 229 | ||
224 | 230 | ||
225 | LOG(("Freetype load fonts...")); |
231 | LOG(("Freetype load fonts...")); |
Line 226... | Line 232... | ||
226 | __menuet__debug_out("Ft load fonts\n"); |
232 | DBG("Ft load fonts\n"); |
227 | 233 | ||
228 | /* Start with the sans serif font */ |
234 | /* Start with the sans serif font */ |
229 | fb_face = fb_new_face(nsoption_charp(fb_face_sans_serif), |
235 | fb_face = fb_new_face(nsoption_charp(fb_face_sans_serif), |
230 | "sans_serif.ttf", |
236 | "sans_serif.ttf", |
231 | NETSURF_FB_FONT_SANS_SERIF); |
237 | NETSURF_FB_FONT_SANS_SERIF); |
232 | if (fb_face == NULL) { |
238 | if (fb_face == NULL) { |
233 | 239 | ||
234 | LOG(("Freetype load fonts failed due SANS unavailable :(...")); |
240 | LOG(("Freetype load fonts failed due SANS unavailable :(...")); |
235 | __menuet__debug_out("Ft Z:(((\n"); |
241 | DBG("Ft Z:(((\n"); |
Line 236... | Line 242... | ||
236 | /* The sans serif font is the default and must be found. */ |
242 | /* The sans serif font is the default and must be found. */ |
237 | LOG(("Could not find the default font\n")); |
243 | LOG(("Could not find the default font\n")); |
Line 238... | Line 244... | ||
238 | FTC_Manager_Done(ft_cmanager); |
244 | FTC_Manager_Done(ft_cmanager); |
239 | FT_Done_FreeType(library); |
245 | FT_Done_FreeType(library); |
240 | return false; |
246 | return false; |
241 | } else { |
247 | } else { |
Line 344... | Line 350... | ||
344 | } else { |
350 | } else { |
345 | fb_faces[FB_FACE_FANTASY] = fb_face; |
351 | fb_faces[FB_FACE_FANTASY] = fb_face; |
346 | } |
352 | } |
Line 347... | Line 353... | ||
347 | 353 | ||
348 | LOG(("Freetype fonts ready...")); |
354 | LOG(("Freetype fonts ready...")); |
Line 349... | Line 355... | ||
349 | __menuet__debug_out("Ft ready :)\n"); |
355 | DBG("Ft ready :)\n"); |
350 | 356 | ||
351 | /* set the default render mode */ |
357 | /* set the default render mode */ |
352 | if (nsoption_bool(fb_font_monochrome) == true) |
358 | if (nsoption_bool(fb_font_monochrome) == true) |