Skip to content

Move tangent/knot visibility to Font constructor parameters#142

Closed
terryspitz wants to merge 3 commits into
mainfrom
claude/remove-show-knots-tangents-VUHgw
Closed

Move tangent/knot visibility to Font constructor parameters#142
terryspitz wants to merge 3 commits into
mainfrom
claude/remove-show-knots-tangents-VUHgw

Conversation

@terryspitz
Copy link
Copy Markdown
Owner

Summary

Refactor the Font class to accept showTangents as a constructor parameter instead of reading it from the Axes configuration object. This decouples visualization options from the axes definition and simplifies the API surface.

Key Changes

  • Font.fs:

    • Added ?showTangentsOpt optional parameter to the Font constructor
    • Replaced all references to axes.show_tangents with the local showTangents variable
    • Removed knot visualization code that was conditionally rendering based on axes.show_knots (lines 1371–1376 and 1391–1394)
  • Axes.fs:

    • Removed show_knots and show_tangents fields from the Axes record type
    • Removed their default values and UI control definitions
  • Api.fs:

    • Updated generateSplineDebugSvgFromDefs to pass true for the showTangents parameter when creating Font instances for spline debugging
    • Removed show_tangents = true from the axes record override (now handled via constructor)
    • Removed show_knots = false and show_tangents = false from the fontGuides axes
    • Removed show_tangents = false from solveAltSplines axes

Implementation Details

The change treats tangent visualization as a Font-level rendering option rather than a global axis setting. This allows different Font instances to have different visualization preferences while sharing the same Axes configuration. Knot visualization has been completely removed from the codebase.

https://claude.ai/code/session_019XXGSjNrx6dXyuSJhoAKeP

claude and others added 3 commits May 25, 2026 20:40
These were debug-only controls that are not needed as user-facing axes.
- show_knots: conditional rendering removed from Font.charToSvg (always off)
- show_tangents: moved to Font constructor optional param (showTangentsOpt)
  so the Glyphs spline debug view can still enable it programmatically

https://claude.ai/code/session_019XXGSjNrx6dXyuSJhoAKeP
tweens-chromium-linux.png: stale baseline (tweens grid no longer has
show_knots or show_tangents rows); CI will regenerate it with missing-
snapshot policy on next run.

tween-show-knots / tween-show-tangents: orphaned — these axes no longer
exist so the tweens test will never generate or compare against them.

https://claude.ai/code/session_019XXGSjNrx6dXyuSJhoAKeP
@terryspitz terryspitz closed this May 30, 2026
@terryspitz terryspitz deleted the claude/remove-show-knots-tangents-VUHgw branch May 30, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants