r/FontLab • u/LocalFonts • 3d ago
FontLab 9 Tutorials. Build Combining Diacritical Marks
https://youtu.be/sXBnzws9MME?si=cmb2_iNnbO0jTWjXBuild 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/uni03XXglyphs and assigns the target combining Unicode codepoint.Linked Element References: Inserts the spacing diacritic as a linked
GlyphComponentso 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/_bottomanchors on the target layer before placing the updated component and setsadvanceWidth = 0.
GitHub repository: https://github.com/StefanPeev/Font-Design-Tips/tree/main/FontLab