Skip to content

Feat: Let CodeEditor take font feature settings (FR-83) - #1080

Open
b-re-w wants to merge 38 commits into
developfrom
feat/code-editor-font-features
Open

b-re-w wants to merge 38 commits into
developfrom
feat/code-editor-font-features

Conversation

@b-re-w

@b-re-w b-re-w commented Nov 25, 2026

Copy link
Copy Markdown
Member

Closes #1078.

  • First commit: the FR-83 line for CodeEditor, agreed by the leader.
  • NodeTable takes FontFeatureSettings (tag 192) on a CodeEditor. The wire and records are the ones Text already uses; the schema hash does not move, because the per-widget list is the renderer's.
  • codeEditorLook appends the node's features to the type ladder's for the editor's text. The line numbers keep the design system's (CodeEditorLook.lineNumberFeatures). The remembered look is keyed on the features, so a change applies.
  • The Android copy is restaged (scripts/stage-android-kotlin.sh).

No Rust change: the writer sends font_feature_settings on any node. The dioxus-compose CodeEditor prop is that repo's follow-up.

Tests: renderer/desktop/test/CodeEditorFontFeatureTest.kt (fr83_code_editor_*). The JetBrains Mono glyph check (-> as two glyphs, caret between them) is done in the app, as the FR-83 line says. Kotlin is verified at CI.

…ager-linux (FR-22.6)

desktop_entry, metainfo and manifest render scripts/packaging-templates/
(app.desktop.in, app.metainfo.xml.in, flatpak-manifest.json.in) and only add
to them: Keywords/MimeType/StartupWMClass after the entry; links, keywords,
screenshots and branding before the content rating, more paragraphs after the
first, OARS attributes and release notes inside the elements the template
leaves empty; the payload's sources and commands, build options, sockets,
permissions, icons and the patchelf module around the Flatpak template's own,
keeping its order. A small reader for the template's JSON (objects, arrays,
strings) and json_holds, which reports a template value the packager changed.
The existing output tests are unchanged. Criterion 11.
…crate manifest is its template (FR-22.6)

manifest::render fills scripts/packaging-templates/templates/AppxManifest.xml.in
(identity name, publisher, version, architecture, names, Windows versions,
first language, application id, executable, description, background colour)
and only adds to it: more languages after the first, foundation and uap
capabilities before runFullTrust, other restricted and device capabilities
after it. The default output is unchanged. compose-rust/build/application.manifest
is the template application.manifest.in byte for byte, checked by the
packaging-templates shell test, since the published crate cannot read the copy.
Criterion 11.
… fork #305 (FR-22.6)

Same blobs as 7e930f67; only the revision moves to 1306bfe1, now on extended.
…-22.6.11)

Git on the Windows runner checks AppxManifest.xml.in out with CRLF line ends,
and the capabilities are put in by finding whole lines ending in "\n", so
nine manifest tests panicked on windows-latest (train-13 run 45546405467).
render now turns CRLF into LF first; two tests render a CRLF copy of the
template and fail without it.
On the Windows runner the compiled-in template already has CRLF line ends,
so turning each LF into CRLF gave CR CR LF, which no checkout produces, and
the test failed there while the nine manifest tests it guards passed
(train-14 run 45557275519).
A coding font such as JetBrains Mono draws -> and => as ligatures by
default, and an editor has to be able to turn them off. FontFeatureSettings
goes to CodeEditor as well, applied to the editor's text and not its line
numbers. Agreed by the leader, 2026-11-25.
…83, #1078)

FontFeatureSettings was taken by Text and TextField only, so an editor in a
coding font drew the ligatures the font turns on by default (-> and =>
as one glyph). NodeTable now takes the property on a CodeEditor as well.
The editor's text style appends the node's features to the type ladder's,
the line numbers keep the design system's (CodeEditorLook.lineNumberFeatures),
and the remembered look is rebuilt when the features change.

CodeEditorFontFeatureTest checks the property is accepted on a CodeEditor
and reaches the text style and not the gutter's, and that an editor without
features is set as before. The Android copy is restaged.
…or-font-features

# Conflicts:
#	CHANGELOG.md
#	compose-rust/android-kotlin/shared/CodeEditorSurface.kt
#	compose-rust/android-kotlin/shared/HostCodeEditor.kt
#	renderer/desktop/src/renderer/CodeEditorSurface.kt
#	renderer/desktop/src/renderer/HostCodeEditor.kt
b-re-w added a commit that referenced this pull request Nov 25, 2026
#1080's entry takes the same place near the top, so the two conflicted.

This branch has not been deployed

No deployments
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.

1 participant