← Font Lab

Mark position tuning

Adjust the horizontal and vertical anchor of each combining mark (Arabic haraka, Hebrew niqqud) as it sits on a Hebrew letter. The live preview uses CSS transforms to show the proposed offset applied to the CURRENT deployed font — it's a visual sketch, not a final render. When you like the values, copy the Python snippet at the bottom and paste it intoscripts/build_stretch_fonts.pyto bake them into the next rebuild.

Mark positioning

The FONT column is the actual rendered א with the mark baked in. The CSS OVERLAY column shows the same text with the current delta applied via transform: translate() — a visual sketch of what a rebuild with the proposed X/Y shifts would look like. Copy the snippet at the bottom to bake the shifts into the font.

MarkFont (baked)CSS overlay previewX shiftY shiftReset
fatha
0x064E · above
אَאَ
0
0
kasra
0x0650 · below
אِאِ
0
0
damma
0x064F · above
אُאُ
0
0
hamza
0x0654 · above
אٔאٔ
140
0
shadda
0x0651 · above
אّאّ
0
0
fathatan
0x064B · above
אًאً
0
0
dammatan
0x064C · above
אٌאٌ
0
0
kasratan
0x064D · below
אٍאٍ
0
0
sukun
0x0652 · above
אْאْ
0
0
maddah
0x0653 · above
אٓאٓ
0
0
daggeralif
0x0670 · above
אٰאٰ
0
0
diaeresis
0x0308 · above
א̈א̈
0
0

Python snippet — paste into build_stretch_fonts.py

Only shows the marks that have non-default X/Y shifts (either the baked-in ones from the current build or your interactive deltas). Paste both dicts into scripts/build_stretch_fonts.py, replacing the existing definitions, then rebuild the Hebrew stretch fonts as shown at the bottom of the snippet.

# --- Paste into scripts/build_stretch_fonts.py ---

_MARK_ANCHOR_X_SHIFT: dict[int, int] = {
    0x0654: 140,  # hamza
}

_ARABIC_MARK_ANCHOR_Y_OVERRIDE: dict[int, int] = {
    # (all defaults)
}

# Then rebuild all Hebrew stretch fonts:
#   .venv/bin/python -c "import sys; sys.path.insert(0,'scripts'); \
#     import build_stretch_fonts as b; \
#     [b.build_one(c) for c in b.CONFIGS if c.get('import_marks')]"