imbajin commented on code in PR #418:
URL: 
https://github.com/apache/incubator-hugegraph-doc/pull/418#discussion_r2385862576


##########
assets/scss/_variables_project.scss:
##########
@@ -4,3 +4,179 @@ Add styles or override variables from the theme here.
 
 */
 
+// Self-hosted font declarations
+// Open Sans font family
+@font-face {
+  font-family: 'Open Sans';
+  font-style: normal;
+  font-weight: 300;
+  font-display: swap;
+  src: url('/assets/fonts/OpenSans-Light.woff2') format('woff2'),
+       url('/assets/fonts/OpenSans-Light.woff') format('woff');
+}
+
+@font-face {
+  font-family: 'Open Sans';
+  font-style: italic;
+  font-weight: 300;
+  font-display: swap;
+  src: url('/assets/fonts/OpenSans-LightItalic.woff2') format('woff2'),
+       url('/assets/fonts/OpenSans-LightItalic.woff') format('woff');
+}
+
+@font-face {
+  font-family: 'Open Sans';
+  font-style: normal;
+  font-weight: 400;
+  font-display: swap;
+  src: url('/assets/fonts/OpenSans-Regular.woff2') format('woff2'),
+       url('/assets/fonts/OpenSans-Regular.woff') format('woff');
+}
+
+@font-face {
+  font-family: 'Open Sans';
+  font-style: italic;
+  font-weight: 400;
+  font-display: swap;
+  src: url('/assets/fonts/OpenSans-Italic.woff2') format('woff2'),
+       url('/assets/fonts/OpenSans-Italic.woff') format('woff');
+}
+
+@font-face {
+  font-family: 'Open Sans';
+  font-style: normal;
+  font-weight: 700;
+  font-display: swap;
+  src: url('/assets/fonts/OpenSans-Bold.woff2') format('woff2'),
+       url('/assets/fonts/OpenSans-Bold.woff') format('woff');
+}
+
+@font-face {
+  font-family: 'Open Sans';
+  font-style: italic;
+  font-weight: 700;
+  font-display: swap;
+  src: url('/assets/fonts/OpenSans-BoldItalic.woff2') format('woff2'),
+       url('/assets/fonts/OpenSans-BoldItalic.woff') format('woff');
+}

Review Comment:
   **Nice to Have**: Consider font subsetting for performance optimization
   
   For the multilingual fonts (Arabic, Persian, Hebrew), consider using Unicode 
range subsetting to reduce file sizes for users who don't need these character 
sets:
   
   ```suggestion
   @font-face {
     font-family: 'Rubik';
     font-style: normal;
     font-weight: 300;
     font-display: swap;
     unicode-range: U+0590-05FF, U+FB1D-FB4F; /* Hebrew range */
     src: url('/assets/fonts/Rubik-Light.woff2') format('woff2'),
          url('/assets/fonts/Rubik-Light.woff') format('woff');
   }
   ```
   
   This would improve loading performance for users who don't need these 
specific language characters.



##########
assets/scss/_variables_project.scss:
##########
@@ -4,3 +4,179 @@ Add styles or override variables from the theme here.
 
 */
 
+// Self-hosted font declarations

Review Comment:
   **Nice to Have**: Add documentation for font configuration
   
   Consider adding a comment block at the top of this file documenting:
   - Total font file sizes per family
   - Browser compatibility notes (WOFF2 vs WOFF fallback strategy)  
   - Instructions for adding new font families
   - Font preloading strategy for critical fonts
   
   This would help future maintainers understand the font hosting setup and 
make informed decisions about modifications.



-- 
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