ใช้ฟอนต์ของคุณเองกับ dock.html และ featured.html ไม่ว่าจะโหลดในแหล่งเบราว์เซอร์ OBS ส่วนขยาย Chrome หรือแอปเดสก์ท็อป
dock.html หรือ featured.html โดยใช้พารามิเตอร์ URL หรือ CSS กำหนดเองของ OBS
featured.html โอเวอร์เลย์พร้อม &googlefont=Pacifico ถูกนำมาใช้ — ฟอนต์ที่โฮสต์เองทำงานแบบเดียวกันผ่าน @font-face.ต้องใช้ลิงก์ HTTPS โดยตรงไปยังไฟล์ฟอนต์ เลือกโฮสต์ที่อนุญาต hotlink/CORS เพื่อให้เบราว์เซอร์ใน OBS หรือแอปดึงไฟล์ได้
ประกาศฟอนต์ด้วย @font-face และชี้ไปยังไฟล์ที่โฮสต์ไว้ แล้วตั้งโอเวอร์เลย์ให้ใช้ผ่าน --font-family.
@font-face {
font-family: 'MyDockFont';
src: url('https://your-site.example/fonts/MyDockFont.woff2') format('woff2');
font-style: normal;
font-weight: 400;
}
/* Optional second weight */
@font-face {
font-family: 'MyDockFont';
src: url('https://your-site.example/fonts/MyDockFont-Bold.woff2') format('woff2');
font-style: normal;
font-weight: 700;
}
:root {
--font-family: 'MyDockFont', 'Segoe UI', 'Arial Unicode MS', sans-serif;
--comment-font-size: 28px;
--author-font-size: 24px;
--message-line-height: 32px;
}
ต้องการหลายฟอนต์ (สำหรับอาร์เมเนีย + รัสเซีย + ละติน) หรือไม่? ประกาศ font-face ของแต่ละฟอนต์และระบุใน --font-family เช่น 'FontA', 'FontB', 'FontC', sans-serif เบราว์เซอร์จะใช้ฟอนต์สำรองอัตโนมัติหากไม่มีอักขระที่ต้องการ
&css=https://your-site.example/my-font.css ลงใน URL หน้า:
https://socialstream.ninja/dock.html?session=YOURSESSION&css=https://your-site.example/my-font.css https://socialstream.ninja/featured.html?session=YOURSESSION&css=https://your-site.example/my-font.css
&css= หรือเข้ารหัส base64 ด้วย &b64css= (ทั้งสองหน้ารองรับตัวเลือกเหล่านี้)&font=YourInstalledFont ใช้ชื่อฟอนต์ระบบ ส่วน &googlefont=Noto+Sans+Armenian,Noto+Sans โหลด Google Fonts หากไม่ต้องการโฮสต์เองตัวเลือกเหล่านี้ทำงานเหมือนกันในส่วนขยาย Chrome แอป Electron และเว็บไซต์ที่โฮสต์ไว้ เพราะทั้งหมดโหลดไฟล์เดียวกัน dock.html/featured.html ไฟล์
ตัวแปรตัวอักษรหลักที่ทั้งสองหน้าใช้:
:root {
--font-family: 'MyDockFont', 'FontB', sans-serif;
--comment-font-size: 28px; /* message text size */
--author-font-size: 24px; /* name text size */
--comment-font-weight: 600; /* featured.html */
--author-font-weight: 700; /* featured.html */
--message-font-weight: 500; /* dock.html */
--name-font-weight: 700; /* dock.html */
--comment-color: #ffffff;
--author-color: #ffe08a;
--comment-bg-color: #161616;
--author-bg-color: #202020;
}
ตัวเลือกเพิ่มเฉพาะแผงด็อก: --stylized-emoji, --stylized-img, --text-stroke-width, --text-shadow, และสีแถว (--highlight-base, --highlight-base2, พร้อม compact รูปแบบต่าง ๆ)
การปรับเลย์เอาต์ Featured: ปรับ --comment-width, --comment-padding, --comment-area-bottom, และ --comment-area-height เพื่อย้ายตำแหน่งบล็อกแถบด้านล่างโดยไม่แก้ HTML
ใช้การเปลี่ยน CSS ร่วมกับตัวเลือก URL ที่มีอยู่ เช่น &scale, &compact, หรือ &hidesource เมื่อต้องปรับเลย์เอาต์ในแผงด็อก
https://socialstream.ninja/fonts.html เพื่อยืนยันว่ามองเห็นฟอนต์ระบบขณะทดสอบ &font=.@font-face บล็อกและ --font-family; ชื่อไม่ตรงกันเป็นปัญหาที่พบบ่อยที่สุด