Skip to content

LT-22351: Offer Graphite features in Styles and refresh after font changes - #1165

Open
jasonleenaylor wants to merge 2 commits into
mainfrom
LT-22351-style-dialog-graphite-features
Open

jasonleenaylor wants to merge 2 commits into
mainfrom
LT-22351-style-dialog-graphite-features

Conversation

@jasonleenaylor

@jasonleenaylor jasonleenaylor commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the two problems that reopened LT-22351, testing with Charis SIL 5.0.

Offer Graphite features in the Styles dialog font tab. The Styles dialog now passes the selected writing system's Graphite setting to the Font Features button before it applies the font name. A Graphite-enabled writing system now gets the Graphite feature list instead of the OpenType one. The default row covers every writing system, so it keeps the OpenType preference.

Refresh views when a writing system's rendering settings change. The writing system model now raises its update event when the default font, its font features, the Graphite setting, the text direction, or the numbering system changes. Before, it did this only when the abbreviation or id changed. The event is raised once, after the save's unit of work has closed, and not at all when the list-changed event will refresh anyway. Font features are compared after normalizing, and the font tab no longer writes the Graphite flag onto a writing system just for displaying it, so an untouched writing system no longer counts as changed.

Why it failed

  • Graphite list: the Font Features button prefers OpenType unless it is told otherwise. Only the Writing System Properties dialog told it about the Graphite setting. Charis SIL 5.0 has both Graphite and OpenType tables, so the Styles dialog always showed the OpenType list.
  • Capital Eng in the preview: the Lexicon Edit dictionary preview keeps the page it generated until something refreshes it. A font or feature edit in Writing System Properties didn't trigger that refresh, so the preview kept its old CSS while data entry repainted. Ken's small caps came through only because the preview page had been generated after an earlier step. I reproduced this in FLEx on a copy of Sena 3. View > Refresh made the preview match data entry, and the Styles dialog path already refreshed correctly.

🤖 Generated with Claude Code


This change is Reviewable

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

NUnit Tests

    1 files  ±0      1 suites  ±0   10m 10s ⏱️ - 2m 36s
6 308 tests +7  6 223 ✅ +7  85 💤 ±0  0 ❌ ±0 
6 317 runs  +7  6 232 ✅ +7  85 💤 ±0  0 ❌ ±0 

Results for commit a145300. ± Comparison against base commit b18c601.

♻️ This comment has been updated with latest results.

@codecov-commenter

codecov-commenter commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.84211% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.02%. Comparing base (b6cbf8e) to head (a145300).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
Src/FwCoreDlgs/FwCoreDlgControls/FwFontTab.cs 75.00% 1 Missing and 2 partials ⚠️
...wCoreDlgs/FwCoreDlgControls/DefaultFontsControl.cs 0.00% 0 Missing and 1 partial ⚠️
...c/FwCoreDlgs/FwCoreDlgControls/FwFontAttributes.cs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1165      +/-   ##
==========================================
+ Coverage   39.01%   39.02%   +0.01%     
==========================================
  Files        1520     1522       +2     
  Lines      352805   353018     +213     
  Branches    40692    40744      +52     
==========================================
+ Hits       137632   137773     +141     
- Misses     185879   185927      +48     
- Partials    29294    29318      +24     
Files with missing lines Coverage Δ
Src/FwCoreDlgs/FwWritingSystemSetupModel.cs 79.76% <100.00%> (+0.76%) ⬆️
...wCoreDlgs/FwCoreDlgControls/DefaultFontsControl.cs 47.64% <0.00%> (+0.55%) ⬆️
...c/FwCoreDlgs/FwCoreDlgControls/FwFontAttributes.cs 62.13% <50.00%> (-0.09%) ⬇️
Src/FwCoreDlgs/FwCoreDlgControls/FwFontTab.cs 62.45% <75.00%> (+0.46%) ⬆️

... and 18 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

jasonleenaylor and others added 2 commits September 29, 2026 07:48
Pass the selected writing system's Graphite setting to the Font Features
button before the font name is applied, so a Graphite-enabled writing
system lists Graphite features instead of the OpenType list. The default
row covers every writing system, so it keeps the OpenType preference.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Raise the writing system model's update event when the default font,
its font features, the Graphite setting, the text direction, or the
numbering system changes, not only when the abbreviation or id changes.
The Lexicon Edit dictionary preview keeps the page it generated earlier
until a refresh, so a feature chosen in Writing System Properties never
reached it. Raise the event once, after the save's unit of work closes,
and skip it when the list update already refreshes.

Also stop the font tab writing the Graphite flag onto a writing system
just for displaying it, which marked an untouched writing system changed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@jasonleenaylor
jasonleenaylor force-pushed the LT-22351-style-dialog-graphite-features branch from 8c56d85 to a145300 Compare September 29, 2026 15:25
@jasonleenaylor
jasonleenaylor marked this pull request as ready for review September 29, 2026 15:32
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