Chuyển đến nội dung
Skillpedia
Website và giao diện (frontend)75k · #2853

font-loading

Skill này làm gì

Skill này kiểm tra cách một website tải các font tùy chỉnh. Skill dành cho lập trình viên muốn chữ hiện ra nhanh và giữ nguyên vị trí.

Khi nào nên dùng

  • ✓Khi chữ bị ẩn một lúc trong khi font tùy chỉnh đang tải.
  • ✓Khi bố cục trang nhảy một lần khi font cuối cùng xuất hiện.
  • ✓Khi trang của bạn có điểm kém về Core Web Vitals.

Liên kết skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/font-loading/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/font-loading/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Vì sao chữ của tôi bị ẩn trong một giây khi trang tải?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent kiểm tra cài đặt font-display và xem các font chính có được preload không. Agent gợi ý font-display swap, và preload cho các file font quan trọng nhất.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Optimize web font loading

Slow font loading can cause 'Flash of Invisible Text' (FOIT) or significant layout shifts, negatively impacting both user experience and Core Web Vitals.

Quick Reference

  • Use font-display: swap to prevent invisible text during load
  • Preload critical fonts to discover them earlier
  • Use modern formats like WOFF2 for better compression

Check

Check font loading strategies and verify that font-display is used and critical fonts are preloaded.

Fix

Add font-display: swap to @font-face declarations and use <link rel='preload'> for the most important fonts.

Explain

Explain how font loading affects perceived performance and layout stability.

Code Review

Review the routes, assets, and loading behavior that affect Optimize web font loading. Flag exact files, requests, or rendering steps that add unnecessary network, CPU, or layout cost, and describe the measurement method used to confirm the issue.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/performance/font-loading

Câu hỏi thường gặp

Flash of Invisible Text là gì?

Đó là khi chữ bị ẩn trong lúc một web font đang tải xuống, và skill nhằm ngăn điều này.

font-display swap làm gì?

Nó hiển thị chữ bằng font dự phòng trước, rồi chuyển sang font tùy chỉnh khi nó tới.

Skill gợi ý định dạng font nào?

Skill gợi ý WOFF2 để nén tốt hơn.

Chi tiết

Mô tả gốc của tác giả

Use when auditing slow page loads, heavy assets, or rendering delays related to Optimize web font loading. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.

repo: thedaviddias/Front-End-Checklist

Độ phổ biến

Sao GitHub
75k
Vị trí xếp hạng
#2853
Giấy phép
MIT
Cập nhật
31/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự