diff options
Diffstat (limited to 'linden/indra/llrender/llfontgl.cpp')
-rw-r--r-- | linden/indra/llrender/llfontgl.cpp | 90 |
1 files changed, 55 insertions, 35 deletions
diff --git a/linden/indra/llrender/llfontgl.cpp b/linden/indra/llrender/llfontgl.cpp index 2740c6c..f72a7de 100644 --- a/linden/indra/llrender/llfontgl.cpp +++ b/linden/indra/llrender/llfontgl.cpp | |||
@@ -304,14 +304,18 @@ BOOL LLFontGL::initDefaultFonts(F32 screen_dpi, F32 x_scale, F32 y_scale, | |||
304 | sSansSerifHuge->reset(); | 304 | sSansSerifHuge->reset(); |
305 | } | 305 | } |
306 | 306 | ||
307 | if (!sSSHugeFallback) | 307 | if (sSSHugeFallback) |
308 | { | 308 | { |
309 | sSSHugeFallback = new LLFontList(); | 309 | delete sSSHugeFallback; |
310 | if (!loadFaceFallback(sSSHugeFallback, sanserif_fallback_file, huge_size*ss_fallback_scale)) | 310 | } |
311 | { | 311 | sSSHugeFallback = new LLFontList(); |
312 | delete sSSHugeFallback; | 312 | if (!loadFaceFallback( |
313 | sSSHugeFallback = NULL; | 313 | sSSHugeFallback, |
314 | } | 314 | sanserif_fallback_file, |
315 | huge_size*ss_fallback_scale)) | ||
316 | { | ||
317 | delete sSSHugeFallback; | ||
318 | sSSHugeFallback = NULL; | ||
315 | } | 319 | } |
316 | 320 | ||
317 | failed |= !loadFace(sSansSerifHuge, sansserif_file, huge_size, sSSHugeFallback); | 321 | failed |= !loadFace(sSansSerifHuge, sansserif_file, huge_size, sSSHugeFallback); |
@@ -326,14 +330,18 @@ BOOL LLFontGL::initDefaultFonts(F32 screen_dpi, F32 x_scale, F32 y_scale, | |||
326 | sSansSerifBig->reset(); | 330 | sSansSerifBig->reset(); |
327 | } | 331 | } |
328 | 332 | ||
329 | if (!sSSBigFallback) | 333 | if (sSSBigFallback) |
330 | { | 334 | { |
331 | sSSBigFallback = new LLFontList(); | 335 | delete sSSBigFallback; |
332 | if (!loadFaceFallback(sSSBigFallback, sanserif_fallback_file, big_size*ss_fallback_scale)) | 336 | } |
333 | { | 337 | sSSBigFallback = new LLFontList(); |
334 | delete sSSBigFallback; | 338 | if (!loadFaceFallback( |
335 | sSSBigFallback = NULL; | 339 | sSSBigFallback, |
336 | } | 340 | sanserif_fallback_file, |
341 | big_size*ss_fallback_scale)) | ||
342 | { | ||
343 | delete sSSBigFallback; | ||
344 | sSSBigFallback = NULL; | ||
337 | } | 345 | } |
338 | 346 | ||
339 | failed |= !loadFace(sSansSerifBig, sansserif_file, big_size, sSSBigFallback); | 347 | failed |= !loadFace(sSansSerifBig, sansserif_file, big_size, sSSBigFallback); |
@@ -348,14 +356,18 @@ BOOL LLFontGL::initDefaultFonts(F32 screen_dpi, F32 x_scale, F32 y_scale, | |||
348 | sSansSerif->reset(); | 356 | sSansSerif->reset(); |
349 | } | 357 | } |
350 | 358 | ||
351 | if (!sSSFallback) | 359 | if (sSSFallback) |
352 | { | 360 | { |
353 | sSSFallback = new LLFontList(); | 361 | delete sSSFallback; |
354 | if (!loadFaceFallback(sSSFallback, sanserif_fallback_file, medium_size*ss_fallback_scale)) | 362 | } |
355 | { | 363 | sSSFallback = new LLFontList(); |
356 | delete sSSFallback; | 364 | if (!loadFaceFallback( |
357 | sSSFallback = NULL; | 365 | sSSFallback, |
358 | } | 366 | sanserif_fallback_file, |
367 | medium_size*ss_fallback_scale)) | ||
368 | { | ||
369 | delete sSSFallback; | ||
370 | sSSFallback = NULL; | ||
359 | } | 371 | } |
360 | failed |= !loadFace(sSansSerif, sansserif_file, medium_size, sSSFallback); | 372 | failed |= !loadFace(sSansSerif, sansserif_file, medium_size, sSSFallback); |
361 | 373 | ||
@@ -369,14 +381,18 @@ BOOL LLFontGL::initDefaultFonts(F32 screen_dpi, F32 x_scale, F32 y_scale, | |||
369 | sSansSerifSmall->reset(); | 381 | sSansSerifSmall->reset(); |
370 | } | 382 | } |
371 | 383 | ||
372 | if (!sSSSmallFallback) | 384 | if(sSSSmallFallback) |
373 | { | 385 | { |
374 | sSSSmallFallback = new LLFontList(); | 386 | delete sSSSmallFallback; |
375 | if (!loadFaceFallback(sSSSmallFallback, sanserif_fallback_file, small_size*ss_fallback_scale)) | 387 | } |
376 | { | 388 | sSSSmallFallback = new LLFontList(); |
377 | delete sSSSmallFallback; | 389 | if (!loadFaceFallback( |
378 | sSSSmallFallback = NULL; | 390 | sSSSmallFallback, |
379 | } | 391 | sanserif_fallback_file, |
392 | small_size*ss_fallback_scale)) | ||
393 | { | ||
394 | delete sSSSmallFallback; | ||
395 | sSSSmallFallback = NULL; | ||
380 | } | 396 | } |
381 | failed |= !loadFace(sSansSerifSmall, sansserif_file, small_size, sSSSmallFallback); | 397 | failed |= !loadFace(sSansSerifSmall, sansserif_file, small_size, sSSSmallFallback); |
382 | 398 | ||
@@ -393,14 +409,18 @@ BOOL LLFontGL::initDefaultFonts(F32 screen_dpi, F32 x_scale, F32 y_scale, | |||
393 | sSansSerifBold->reset(); | 409 | sSansSerifBold->reset(); |
394 | } | 410 | } |
395 | 411 | ||
396 | if (!sSSBoldFallback) | 412 | if (sSSBoldFallback) |
397 | { | 413 | { |
398 | sSSBoldFallback = new LLFontList(); | 414 | delete sSSBoldFallback; |
399 | if (!loadFaceFallback(sSSBoldFallback, sanserif_fallback_file, medium_size*ss_fallback_scale)) | 415 | } |
400 | { | 416 | sSSBoldFallback = new LLFontList(); |
401 | delete sSSBoldFallback; | 417 | if (!loadFaceFallback( |
402 | sSSBoldFallback = NULL; | 418 | sSSBoldFallback, |
403 | } | 419 | sanserif_fallback_file, |
420 | medium_size*ss_fallback_scale)) | ||
421 | { | ||
422 | delete sSSBoldFallback; | ||
423 | sSSBoldFallback = NULL; | ||
404 | } | 424 | } |
405 | failed |= !loadFace(sSansSerifBold, sansserif_bold_file, medium_size, sSSBoldFallback); | 425 | failed |= !loadFace(sSansSerifBold, sansserif_bold_file, medium_size, sSSBoldFallback); |
406 | 426 | ||