Skip to content

[web] Cover Skwasm font loading from Dart and JavaScript byte views #194217

Description

@yexuan910812

Skwasm font loading accepts a Uint8List, which may be a view into a larger buffer or backed by a JavaScript Uint8Array. Focused engine tests should preserve this behavior when the font-data copy path changes.

Proposed coverage:

  • A Dart-allocated Uint8List and JSUint8Array.withLength(...).toDart.
  • A font view starting at byte offset 0 and at byte offset 13.

Each case places a valid Ahem font into a larger buffer, takes a Uint8List.sublistView of the font bytes, verifies that SkwasmFontCollection.loadFontFromBytes succeeds, and checks that the entire source buffer remains unchanged, including sentinel bytes outside the view.

All four cases already pass at b314ad53146b1bde55b60197a35183fb530aac0a in the chrome-coi-dart2wasm-skwasm-skwasm suite. This tracks additional coverage for existing behavior, requires no production change, and makes no performance claim.

Activity

  1. added
    in triagePresently being triaged by the triage team
    team-webOwned by Web platform team
    a: tests"flutter test", flutter_test, or one of our tests
    engineflutter/engine related. See also e: labels.
    and removed
    in triagePresently being triaged by the triage team
    on Oct 13, 2026
  2. puneetkukreja98 commented on Oct 13, 2026

    @puneetkukreja98
    Contributor

    @yexuan910812 Thanks for reporting this, routing this to team-web for further investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: tests"flutter test", flutter_test, or one of our testsengineflutter/engine related. See also e: labels.team-webOwned by Web platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions