Subversion Repositories tpanel

Rev

Rev 163 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 163 Rev 164
Line 567... Line 567...
567
 
567
 
568
    if (iter == mFonts.end())
568
    if (iter == mFonts.end())
569
    {
569
    {
570
        MSG_ERROR("No font with index " << number << " found!");
570
        MSG_ERROR("No font with index " << number << " found!");
571
        TError::setError();
571
        TError::setError();
572
        return sk_sp<SkTypeface>();
572
        return nullptr;
573
    }
573
    }
574
 
574
 
575
    if (!_tfontCache.empty())
575
    if (!_tfontCache.empty())
576
    {
576
    {
577
        map<string, sk_sp<SkTypeface> >::iterator itFont = _tfontCache.find(iter->second.file);
577
        map<string, sk_sp<SkTypeface> >::iterator itFont = _tfontCache.find(iter->second.file);
Line 645... Line 645...
645
            }
645
            }
646
        }
646
        }
647
    }
647
    }
648
    else
648
    else
649
    {
649
    {
-
 
650
        if (tf->countTables() > 0)
-
 
651
        {
650
        _tfontCache.insert(pair<string, sk_sp<SkTypeface> >(iter->second.file, tf));
652
            _tfontCache.insert(pair<string, sk_sp<SkTypeface> >(iter->second.file, tf));
651
        MSG_DEBUG("Font \"" << path << "\" was loaded successfull.");
653
            MSG_DEBUG("Font \"" << path << "\" was loaded successfull.");
-
 
654
        }
-
 
655
        else
-
 
656
        {
-
 
657
            MSG_WARNING("Refused to enter invalid typeface into font cache!");
-
 
658
        }
652
    }
659
    }
653
 
660
 
654
    SkString sname;
661
    SkString sname;
655
    tf->getFamilyName(&sname);
662
    tf->getFamilyName(&sname);
656
 
663