Skip to content

Cách tạo font Tiếng Việt cho Kobo

Thành Thân Thiện edited this page Aug 28, 2020 · 1 revision

Cách tạo font Tiếng Việt cho Kobo

Nói chính xác hơn là lấy 2 font có hỗ trợ Tiếng Việt, sau đó làm giả thông tin thành font Avenir NextGeorgia.

Chuẩn bị font

Tải font từ Google Fonts, hoặc từ nguồn nào khác tùy thích như font hệ thống chẳng hạn:

  • Linux: /usr/share/fonts
  • Windows: C:\Windows\Fonts

Lưu ý khi chọn font:

  • Có hỗ trợ Tiếng Việt.
  • Nên có 2 loại font khác nhau: Serif (có gạch chân), Sans-serif (không có gạch chân).
  • Nên có đủ 4 kiểu: thường (Regular hoặc không), đậm (Bold), nghiêng (Italic), đậm-nghiêng (BoldItalic).

Đổi thông tin font

  1. Tải và cài đặt FontForge.

    Font Style Export Fontname Family Name Name For Human
    Sans-serif Regular Avenir.ttf AvenirNext Avenir Next Avenir Next
    Sans-serif Bold Avenir-Bold.ttf AvenirNext-Bold Avenir Next Avenir Next Bold
    Sans-serif Italic Avenir-Italic.ttf AvenirNext-Italic Avenir Next Avenir Next Italic
    Sans-serif Bold Italic Avenir-BoldItalic.ttf AvenirNext-BoldItalic Avenir Next Avenir Next Bold Italic
    Serif Regular georgia.ttf Georgia Georgia Georgia
    Serif Bold georgiab.ttf Georgia-Bold Georgia Georgia Bold
    Serif Italic georgiai.ttf Georgia-Italic Georgia Georgia Italic
    Serif Bold Italic georgiaz.ttf Georgia-BoldItalic Georgia Georgia Bold Italic
  2. Mở font đã tải bằng FontForge và sửa theo bảng trên:

    • Element > Font Info: Điền 3 mục Fontname, Family Name và Name For Human.
    • File > Generate Fonts:
      • Lưu tên file đúng như cột Export.
      • Chọn loại TrueType - No Bitmap Fonts.
      • Bỏ check mục Validate Before Saving.

Tạo file KoboRoot.tgz

Tạo cây thư mục: KoboRoot/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/fonts/.

mkdir -p KoboRoot/usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/fonts

Chép 8 file kiểu font đã sửa ở trên vào thư mục fonts, sau đó tạo file nén tgz:

cd KoboRoot
tar czf KoboRoot.tgz ./usr