fix: prevent render-blocking Font Awesome fonts using local loading #71
+22
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📦 Pull Request
📌 Linked Issue
🛠 Changes Made
@fortawesome/fontawesome-free.public/fonts/fontawesome/directory to serve fonts locally.fontawesome.csswith@font-facedeclarations.font-display: swapto Font Awesome font definitions to eliminate FOIT.🧪 Testing
Manual Testing (Chrome DevTools)
Test case 1:
Steps:
npm start.Expected Result:
Font Awesome
.woff2files should load from local paths without errors.Actual Result:
✔
fa-solid-900.woff2andfa-brands-400.woff2loaded successfully from local server with HTTP304status.Test case 2:
Steps:
Expected Result:
Fonts should not block rendering and should be cached.
Actual Result:
✔ Fonts loaded after
DOMContentLoaded, were cached correctly, and did not block initial render.📸 UI Changes
(No visual UI changes; performance and loading behavior improvement only.)
📸 Performance Comparison (Before vs After)
📝 Documentation Updates
✅ Checklist
💡 Additional Notes
font-display: swap.