fonts gate before composition scripts only covers faces that static markup already uses
Maintainer thường phản hồi trong vòng 1 ngày
@user-github-me đang làm issue này rồi.
Từ ngày 8/10/2026.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- html, typescript
- Lĩnh vực
- frontend, performance
Hướng nghiên cứu
Start by inspecting the composition-script font-readiness gate changed in #4980 and reproduce with the attached index.html, local font, and render --workers 1; compare script-time measurements with document.fonts.load() results. The issue outlines two possible approaches but does not choose between them, so the fix needs investigation and a decision. Done when script-built text measures with its intended font before composition scripts proceed, without breaking the existing timeout behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Since 0.8.122 (#4980) composition scripts start only after web fonts are ready, which fixed measure-after-build layouts for fonts that static markup uses. The gate does not cover a face that only script-built text uses: it forces one layout, then awaits document.fonts.ready, and a face starts loading only when some text already in the DOM requests it. Text created by the composition script requests its face afterwards, so a getBoundingClientRect() taken at script time still sees the fallback font for that face. Which faces are loaded when a script runs therefore depends on what other scenes in the assembled page happen to show statically.
Repro (two files, attached): a local @font-face ("LocalFace", font-display: block, embedded by the compiler as a data URI) that no static text uses. The script sets a title in that face, measures it, centres it from the measurement, registers the timeline, then measures again inside document.fonts.load() and writes both numbers into the frame.
- v0.8.135,
render --workers 1:script-time width 1378.1 status unloaded/after fonts.load width 1056.5 status loaded. The title is centred from the first number, so it sits 161 px off centre in the final frame. - Control: uncomment the one static
<span>in the face and both widths are 1056.5 with statusloadedat script time.
Same mechanism with the compiler-fetched Google face: in a nine-scene project, a script-built block measured correctly only because an unrelated scene's static label happened to use the same weight; a second script-built block whose rows use a different weight measured 4 px short and was centred 2 px off. A handwritten title whose underline is drawn to the measured width rendered the underline 253 px too long and the title 114 px off centre in every render.
Two fixes look possible from the outside:
- Before releasing the scripts, call
load()on every declaredFontFace(Array.from(document.fonts).map((f) => f.load())) under the existing 5 s cap, so the stated guarantee holds for script-built text too. - A lint finding when a composition script calls
getBoundingClientRect/offsetWidth/offsetHeightoutside adocument.fonts.load()/document.fonts.readycallback, with the fix hint to measure inside it and register the timeline at the end (the documented async-build path).
Repro project (index.html, assets/fonts/local-face-700.woff2, package.json, hyperframes.json) and the rendered frame attached. Render log lines come from the page console as surfaced by the CLI.
Attachments: repro-bundle.zip (the four repro files)
- Ngôn ngữ chính
- TypeScript
- Star
- 54.1k
- Fork
- 4.9k
- Merge trung bình
- 7 giờ 19 phút
- Pull request đã merge (30 ngày)
- 746
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của heygen-com/hyperframes
-
gcp-cloud-run image pins Chrome 148, which drops `background-clip: text` glyphs inside layered children; the CLI's Chrome 152 paints themCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
heygen-com/hyperframes#5117 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docs: clarify that "Enable auto-update" is only available in the Claude Code terminal (CLI) /plugin UICó thể đã có người làm @rumi7911 đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
heygen-com/hyperframes#5027 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(producer): propagate useGpu to HDR layered streaming encoderCó thể đã có người làm @Monster-GM đã nhận 4 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
heygen-com/hyperframes#5002 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
skills: remoteHeadSha() can open a Git Credential Manager dialog on Windows (GIT_TERMINAL_PROMPT does not cover GUI helpers; slug unvalidated)Có thể đã có người làm @RaphaelFakhri đã nhận 8 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
heygen-com/hyperframes#4702 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Studio catalog prompt editor has no accessible nameCó thể đã có người làm @lorenzozanee đã nhận 14 ngày trước. Đang mởbug difficulty/easy triage/ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
heygen-com/hyperframes#4384 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của heygen-com/hyperframes
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
siyuan-note/siyuan#20313 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
alunduil/projects-v2-sync#14 ·
-
Service process inherits the caller's cwd at first use, holding that folder open on Windows (EBUSY)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
DevTools page styles leak into the host app in developmentCó thể đã có người làm @onmax đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
nuxt-modules/better-auth#567 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày