[Webkit-unassigned] [Bug 157414] New: Broken fonts break fallback

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 5 22:44:44 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=157414

            Bug ID: 157414
           Summary: Broken fonts break fallback
    Classification: Unclassified
           Product: WebKit
           Version: Other
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Text
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mmaxfield at apple.com
                CC: mmaxfield at apple.com

Created attachment 278236
  --> https://bugs.webkit.org/attachment.cgi?id=278236&action=review
Reproduction

When the first item in a font-family list is a web font which points to a file which is broken (CTFontManagerCreateFontDescriptorFromData() returns nullptr), we don't try the next item in the font-family list. Instead, we use Times.

This is due to FontCascadeFonts::realizeFallbackRangesAt() treating the first font-family as special (since this is the font we use for line metrics).

In the following code block, we are hitting the fontRangesForFamily line, which explicitly passes in standardFamily.

    if (!index) {
        fontRanges = realizeNextFallback(description, m_lastRealizedFallbackIndex, m_fontSelector.get());
        if (fontRanges.isNull() && m_fontSelector)
            fontRanges = m_fontSelector->fontRangesForFamily(description, standardFamily);
        if (fontRanges.isNull())
            fontRanges = FontRanges(FontCache::singleton().lastResortFallbackFont(description));
        return fontRanges;
    }

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160506/c260877b/attachment.html>


More information about the webkit-unassigned mailing list