VGalaxies opened a new pull request, #418:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/418

   close https://github.com/apache/incubator-hugegraph/issues/2854
   
   ---
   
   ## ๐Ÿš€ Description
   
   This PR implements self-hosted fonts for the HugeGraph documentation 
website, replacing external CDN font loading with local font files. This change 
improves website privacy, performance, and reliability by eliminating external 
dependencies for font loading.
   
   ## ๐Ÿ”ง Changes Made
   
   ### Font Implementation
   - **Added 38 self-hosted font files** supporting 4 font families:
     - **Open Sans** (300, 400, 700 weights + italic variants) - Primary UI font
     - **Rubik** (300, 400, 500, 600, 700 weights) - Hebrew language support
     - **Tajawal** (300, 400, 500, 700 weights) - Arabic language support  
     - **Vazir** (300, 400, 500, 700 weights) - Persian/Farsi language support
   
   ### Configuration Updates
   - **Disabled external Google Fonts loading** by setting 
`$td-enable-google-fonts: false`
   - **Removed CDN font imports** from RTL stylesheet for multilingual fonts
   - **Added comprehensive @font-face declarations** in 
`assets/scss/_variables_project.scss`
   - **Implemented font-display: swap** for optimal loading performance
   
   ### Multilingual Support
   - Maintained full support for RTL languages (Arabic, Persian, Hebrew)
   - Preserved existing font fallback chains for compatibility
   - Ensured consistent typography across all supported languages
   
   ## ๐Ÿ“ˆ Benefits
   
   - **๐Ÿ”’ Privacy**: No external requests to Google Fonts or other CDNs
   - **โšก Performance**: Faster loading with local font files and font-display: 
swap
   - **๐Ÿ›ก๏ธ Reliability**: Eliminates dependency on external CDN availability
   - **๐ŸŒ Offline Support**: Fonts work without internet connectivity
   - **๐Ÿ“ฑ Consistency**: Same fonts guaranteed across all users and environments
   
   ## ๐Ÿงช Testing
   
   - [x] Website builds successfully with `hugo server`
   - [x] All font weights and styles load correctly
   - [x] Multilingual pages display proper fonts (Arabic, Persian, Hebrew)
   - [x] No external font requests in browser network tab
   - [x] Font fallbacks work as expected
   
   ## ๐Ÿ“ File Changes
   
   - **Added**: 38 font files in `assets/fonts/` (WOFF and WOFF2 formats)
   - **Modified**: `assets/scss/_variables_project.scss` - Added @font-face 
declarations
   - **Modified**: `themes/docsy/assets/scss/_variables.scss` - Disabled Google 
Fonts
   - **Modified**: `themes/docsy/assets/scss/rtl/_main.scss` - Removed external 
font imports
   
   ## ๐Ÿ”— Related Issues
   
   Addresses website performance and privacy concerns by implementing 
self-hosted fonts as requested.
   
   ---
   
   **Total size**: ~1.8MB of font files added
   **Formats supported**: WOFF2 (modern browsers) + WOFF (fallback)
   **Languages supported**: English, Arabic, Persian/Farsi, Hebrew


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to