FontLab 8 · v1.1

ปักหมุดสระ–วรรณยุกต์ และจัดช่องไฟฟอนต์ไทย ในคลิกเดียว Thai anchors and spacing, in one click

สคริปต์ฟรีสองตัวสำหรับ FontLab 8 — Autotune วาง anchor และสร้าง ccmp / mark / mkmk ส่วน Autokern จัดช่องไฟและ kerning จากรูปทรงจริงของตัวอักษร Two free scripts for FontLab 8 — Autotune places anchors and builds ccmp / mark / mkmk, Autokern sets spacing and kerning from the actual outlines.

ทดสอบกับ FontLab 8.4.2 บน macOS · ใช้ได้ทั้ง single และ multi-master · MIT License Tested with FontLab 8.4.2 on macOS · Single & multi-master · MIT License

F0NT Autotune

Anchor ไทยครบชุด พร้อม FeaturesComplete Thai anchors, with Features

วาง anchor ให้พยัญชนะ สระ และวรรณยุกต์จากรูปทรงของแต่ละตัว แล้วเขียน feature ให้พร้อม CompilePlaces anchors on consonants, vowels and tone marks from each glyph’s shape, then writes features ready to compile.

วาง anchor จากรูปทรงจริงAnchors from real outlines

top / bottom ของพยัญชนะ และ _top / _bottom ของสระและวรรณยุกต์ คำนวณจากกรอบเส้นของแต่ละตัว โดยอ้างอิงความสูงพยัญชนะที่ดึงจาก ก ด บ หรือ อConsonant top / bottom and mark _top / _bottom are computed from each glyph’s ink bounds, referenced to the consonant height read from ก ด บ or อ.

หลบหางและตัดเชิงTail dodging & descender cuts

เลื่อนสระบนหลบหาง ป ฝ ฟ ฬ และสลับ ญ ฐ เป็นตัวตัดเชิงเมื่อมีสระล่าง ทำงานทุกโหมดShifts upper marks away from the tails of ป ฝ ฟ ฬ and swaps ญ ฐ for their descender-less forms above lower vowels.

ปรับระยะเยื้องรายตัวPer-mark offsets

โหมดละเอียดแยก anchor ตามวรรณยุกต์แต่ละตัว และเลื่อนวรรณยุกต์หรือสระได้ทีละตัวDetailed mode gives each tone mark its own anchor, with adjustable offsets for every mark.

ไม่ทับงานที่มีอยู่Respects existing work

feature ที่คุณเขียนเองจะไม่ถูกเขียนทับถ้าไม่อนุญาต ใช้ได้ทุก master และมีปุ่มตรวจ OT Class ของ glyph ไทยYour own features are never overwritten unless you allow it; works across masters and can check Thai OT glyph classes.

baseline ความสูงพยัญชนะ consonant height ก top bottom _top · top _top สระบน upper vowel วรรณยุกต์ tone mark พยัญชนะ consonant
● anchor ฐาน  ○ anchor ของเครื่องหมาย (ขึ้นต้นด้วย _) — mark วางสระบนพยัญชนะ ส่วน mkmk วางวรรณยุกต์ซ้อนบนสระ● base anchor  ○ mark anchor (prefixed _) — mark places vowels on consonants, mkmk stacks tones on vowels
F0NT Autokern

ช่องไฟและ Kerning จากรูปทรงจริงSpacing and kerning from real shapes

วัดขอบซ้าย–ขวาของเส้นทีละระดับความสูง แล้วจัดระยะให้ตัวกลม เฉียง และเว้าดูสมดุลกับตัวตรงMeasures each outline’s left and right edges band by band, so round, diagonal and open shapes balance against straight ones.

วัดเส้นจริง 24 ระดับ24 measured bands

ตัดเส้นแต่ละตัวเป็นแถบแนวนอนจาก baseline ถึงความสูงอ้างอิง แล้ววัดว่าเส้นเว้าเข้าไปลึกแค่ไหนEach outline is sliced into horizontal bands from baseline to reference height to measure how deep its sides recede.

Kerning เทียบกับ H–HKerning relative to H–H

ดึงคู่ที่ห่างกว่าคู่ตัวตรงเข้าหากัน เช่น T–o, A–V และไม่ยุ่งกับคู่ที่สมดุลอยู่แล้ว เช่น o–oPairs that sit wider than straight–straight are pulled in (T–o, A–V); balanced pairs like o–o are left alone.

ทุก Master ในครั้งเดียวEvery master at once

วัดและเขียนแยกตามรูปทรงของแต่ละ master ลงตาราง Kerning ของ master นั้นโดยตรงMeasures each master separately and writes to that master’s own kerning table.

ล้างอย่างระวังCareful clean-up

เลือกล้างคู่เดิมได้ โดยลบเฉพาะคู่ glyph–glyph ในกลุ่มที่เลือก คู่ class ไม่ถูกแตะOptionally clears old pairs — only glyph–glyph pairs within the chosen scripts; class pairs are kept.

ระยะห่างจริง ทีละแถบ actual gap per band
T–o: ระยะห่างในทุกแถบกว้างกว่าคู่ H–H มาก จึงได้ kerning ติดลบT–o: every band is far wider than H–H, so the pair gets negative kerning
ติดตั้งInstall

ติดตั้งในหนึ่งนาทีInstall in a minute

วางไฟล์ในโฟลเดอร์ Scripts ของ FontLab แล้วเรียกใช้จากเมนูDrop the files into FontLab’s Scripts folder and run them from the menu.

  1. ดาวน์โหลดDownload F0NT_Autotune.py และ F0NT_Autokern.pyF0NT_Autotune.py and F0NT_Autokern.py
  2. เปิดโฟลเดอร์Open the folder FontLab › Scripts › Open Scripts FolderFontLab › Scripts › Open Scripts Folder
  3. วางไฟล์Drop the files คัดลอกไฟล์ทั้งสองลงไปCopy both files in
  4. รีเฟรชแล้วใช้งานRefresh & run Scripts › Update / Refresh Scripts แล้วเลือกจากเมนู ScriptsScripts › Update / Refresh Scripts, then pick them from the Scripts menu
~/Library/Application Support/FontLab/FontLab 8/Scripts

ก่อนใช้งานBefore you start

ไม่มี UndoNo undo

สคริปต์แก้ฟอนต์โดยตรง ให้ทดสอบกับไฟล์สำเนาก่อนเสมอ และจะมีหน้าต่างให้ยืนยันก่อนแก้ทุกครั้งThe scripts edit your font directly. Always test on a copy — every change asks for confirmation first.

ลองทีละตัวได้Try one glyph first

เลือกขอบเขต “Glyph ที่เปิดอยู่” เพื่อลองกับตัวเดียวก่อน ในโหมดนี้ Autotune จะไม่แตะ FeaturesChoose “Active glyph” to try a single glyph; Autotune leaves Features untouched in this mode.

มีปัญหา?Something wrong?

กด “รายละเอียด” ที่ด้านล่างหน้าต่างเพื่อดู log ระบบจะเปิดให้เองเมื่อมีข้อผิดพลาด ดูวิธีแก้ได้ในOpen “Details” at the bottom of the window for the log — it opens by itself on errors. See the คู่มือmanual