Branch: refs/heads/webkitglib/2.52
  Home:   https://github.com/WebKit/WebKit
  Commit: c733893e0f4847430edbb83f56362be771e2b370
      
https://github.com/WebKit/WebKit/commit/c733893e0f4847430edbb83f56362be771e2b370
  Author: Claude Opus 4.6 (1M context) <[email protected]>
  Date:   2026-04-16 (Thu, 16 Apr 2026)

  Changed paths:
    M Source/WebCore/platform/graphics/skia/FontPlatformDataSkia.cpp
    M Source/WebCore/platform/graphics/skia/SkiaHarfBuzzFont.cpp
    M Source/WebCore/platform/graphics/skia/SkiaHarfBuzzFont.h

  Log Message:
  -----------
  Cherry-pick 311353@main (58d943e440ad). 
https://bugs.webkit.org/show_bug.cgi?id=305040

    [GTK][WPE] Some emoji characters rendered as missing glyph
    https://bugs.webkit.org/show_bug.cgi?id=305040

    Reviewed by Carlos Garcia Campos.

    Emoji characters with default emoji presentation (such as U+1F680 ROCKET
    and U+1F643 UPSIDE-DOWN FACE) could render as missing glyph boxes in web
    content on the GTK and WPE ports.

    The root cause is that SkiaHarfBuzzFont::m_isColorBitmapFont was
    initialized to false and only set to the correct value when scaledFont()
    was called during text shaping. However,
    fontForCombiningCharacterSequence() calls
    canRenderCombiningCharacterSequence() — which uses glyph() — before any
    shaping occurs, so m_isColorBitmapFont was still false at that point.

    With m_isColorBitmapFont incorrectly false, glyph() with an emoji
    variation selector (U+FE0F) on a color font would bail out early
    (thinking the font is not a color font), causing
    canRenderCombiningCharacterSequence() to return false and
    fontForCombiningCharacterSequence() to return nullptr. This resulted in
    the emoji being rendered with the primary font (which has no emoji
    glyphs), producing missing glyph boxes.

    The fix initializes m_isColorBitmapFont in the SkiaHarfBuzzFont
    constructor by checking the typeface's color tables, so it is correct
    from creation. FontPlatformData::platformDataInit() now reads the value
    from SkiaHarfBuzzFont via a getter instead of recomputing it.

    * Source/WebCore/platform/graphics/skia/FontPlatformDataSkia.cpp:
    (WebCore::FontPlatformData::platformDataInit):
    * Source/WebCore/platform/graphics/skia/SkiaHarfBuzzFont.cpp:
    (WebCore::SkiaHarfBuzzFont::SkiaHarfBuzzFont):
    * Source/WebCore/platform/graphics/skia/SkiaHarfBuzzFont.h:

    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
    Canonical link: https://commits.webkit.org/311353@main

Canonical link: https://commits.webkit.org/305877.437@webkitglib/2.52



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to