← Back to Pull requests

Add Recursive variable font and automated canvas tests for font variants #4778

Open
unknown opened this pull request with 220 lines diff across 2 files
View on GitHub
unknown unknown commented on Oct 14, 2026 14:41 UTC
Author

<!--- Describe your changes in detail -->
This PR addresses #4480 by adding an example of a "true" variant font and automated canvas tests for font variants:

  • Fonts Example App: Added the open-source Recursive Variable Font (Recursive-VF.ttf) to examples/font/font/resources/, registered it for normal, bold, italic, and bold-italic variants, and added labels displaying all 4 variants in the UI.

  • Testbed Fonts: Added Recursive-VF.ttf and Roboto-Regular.ttf to testbed/src/testbed/resources/fonts/.

  • Canvas Tests: Added automated tests to testbed/tests/widgets/canvas/test_canvas.py for each font family:

  • - test_endor_font_variants: Renders Endor in normal, bold, italic, and bold-italic.
    - test_roboto_font_variants: Renders Roboto in normal, bold, italic, and bold-italic.
    - test_recursive_font_variants: Renders Recursive in normal, bold, italic, and bold-italic.
  • Changenote: Added towncrier note changes/4480.feature.md.
  • <!--- What problem does this change solve? -->
    As discussed in #2159 and requested in #4480, macOS and iOS do not render faux bold/italic for fonts like Endor that lack true variants, unlike GTK and Windows. This PR adds a true variable font to the fonts example and automated canvas tests verifying variant rendering for each font.

    <!--- If this PR relates to an issue, include Refs #XXX or Fixes #XXX -->
    Fixes #4480

    PR Checklist:


    <!--- Go over all the following points, and put an x in all the boxes that apply. -->
  • I will abide by the BeeWare Code of Conduct

  • I have read and have followed the [CONTRIBUTING.md](../blob/main/CONTRIBUTING.md) file

  • This PR was generated or assisted using an AI tool

  • Assisted-by: ChatGPT

    Diff: 220 lines (+165 / -55) across 2 files Reviewer: freakboy3742 Review duration: 6305m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.37) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 220 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.323
    Real PR Conversation Timeline
    1 comments
    "Review active on #4778"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.8% (MEDIUM) · Higher = larger blast radius
    36.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.6% · Safe to merge
    19.6%
    Repository