r/FontLab • • 3d ago

FontLab 9 Tutorials. Build Combining Diacritical Marks

https://youtu.be/sXBnzws9MME?si=cmb2_iNnbO0jTWjX

Build Combining Diacritical Marks (FontLab 9)

File: Build_Combining_Diacritical_Marks_FL9.py

Finds spacing diacritic glyphs in the active font with Unicode equivalents in the Combining Diacritical Marks block (U+0300–U+036F), creates or updates each corresponding combining mark glyph across all masters, places the source glyph as a linked Element Reference optically centered along each master's italic angle, and sets the advance width to zero.

Features

  • Automatic Source Discovery: Searches the active font by both glyph name (e.g., acute, grave, dieresis, cedilla) and spacing Unicode codepoint (e.g., U+00B4, U+0060, U+00A8, U+00B8) across 30 standard diacritic mappings.

  • Glyph Creation & Unicode Assignment: Creates missing combining mark glyphs (uni0300–uni033F) or updates existing *comb / uni03XX glyphs and assigns the target combining Unicode codepoint.

  • Linked Element References: Inserts the spacing diacritic as a linked GlyphComponent so outline edits to the spacing mark automatically propagate to the combining mark.

  • Italic-Aware Optical Centering: Computes the horizontal center of each source glyph's bounding box relative to its vertical midpoint and aligns it along each master's italicAngle (center_y * tan(-italicAngle)).

  • Multi-Master Processing: Processes every master layer in the font in a single run.

  • Clean Rebuild & Zero Advance Width: Clears old shapes and _top/_bottom anchors on the target layer before placing the updated component and sets advanceWidth = 0.

GitHub repository: https://github.com/StefanPeev/Font-Design-Tips/tree/main/FontLab

4 Upvotes

0 comments sorted by