Skip to content

fontlabapp.fontui.hint_removal

hint_removal

Remove PostScript stem hints from the selected glyphs, horizontal and/or vertical.

What it does: For each selected glyph and chosen master, the script removes the horizontal hints, the vertical hints or both from the layer. FontLab's source does not touch plain guidelines or TrueType instructions here. The table shows the hint counts before and after.

How it works: A non-modal panel lists every glyph and master with its hint counts, or the reason why the layer is skipped. A layer without hints in the chosen directions is listed and skipped. Apply reads the font again and calls the native flLayer.removeHints(horizontal, vertical) on every planned layer, all in one Undo step through the shared module fly.ap.core.history.glyphs. After the write it counts the hints again and reports any layer that still has hints in a chosen direction. The hint counts and the panel are shared (fly.ap.hints.postscript, fly.ap.contours.selection.panel.model).

Why this design: - The removal is FontLab's own call, so hints are removed exactly as the menu command removes them. - The script adds what the menu command does not: every master in one step, one direction only, the counts in view and one Undo step. - Automatic layers and glyphs with automatic layers are never edited. A base of automatic composites is skipped unless you tick "Edit bases of auto glyphs anyway": the change notification makes FontLab rebuild those composites, which can drop their anchors and locks, and Undo does not restore them. Locked layers are skipped. - Apply discloses queued ids and their possible date changes. The script does not call UpdateAll (fl#8537).

How to use: Select glyphs in the Font window. Run the script. Tick the directions, choose the current master or all masters, check the table and press Remove Hints. Each Apply is recorded as one Undo step.

Benefit: Clean hint-free layers before a new autohint pass or a TrueType-only export, in every master, in one step.

Credit: Adapted from the author's own FontLab sample, Apache-2.0 (hints_remove.py, "Remove PostScript Hints").

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
main function () -> Any Open the panel. (shared captured text)
panel_type function () -> type Build the panel class once Qt is available (inside FontLab).