Skip to content

feat(fonts): updated font related type defs and doc comments + added missing doc for Wezterm.font_with_fallback#160

Merged
DrKJeff16 merged 5 commits into
DrKJeff16:mainfrom
KevinSilvester:fonts
Apr 21, 2026
Merged

feat(fonts): updated font related type defs and doc comments + added missing doc for Wezterm.font_with_fallback#160
DrKJeff16 merged 5 commits into
DrKJeff16:mainfrom
KevinSilvester:fonts

Conversation

@KevinSilvester

@KevinSilvester KevinSilvester commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

Changes

  • Created FontStyle enum for styles field of font attributes
  • Created FontAttributesBase as a parent class with common fields to FontFamilyAttributes and FontAttributes
  • Created TextStyleAttributes type for the second optional param of Wezterm.font() and Wezterm.font_with_fallback methods
  • Updated FontFamilyAttributes and FontAttributes fields to reflect their rust struct counterparts LuaFontAttributes and FontAttributes
  • Renamed Font to TextStyle to mirror its rust struct name.
  • Added missing optional foreground field to TextStyle/Font
  • Updated the types of all font-related config options to TextStyle
  • Updated the function signatures of Wezterm.font() and Wezterm.font_with_fallback
  • Updated hover doc of Wezterm.font() and added a note to explain the behaviour of the optional attribute param.
  • Added the missing doc for Wezterm.font() also with a note to explain the behaviour of the optional attribute param.

Source(s)

struct/enum definitions:

method definitions:

config options:

KevinSilvester and others added 4 commits April 20, 2026 15:17
… `Wezterm.font_with_fallback()`

type def changes:
* added `FontStyle`
* added `FontAttributesBase`
* added `FontAttributesIn`
* added `TextStyleAttributes`
* updated `FontAttributes`
* updated `Font`
* renamed `Font` -> `TextStyle`
…back to `FontFamilyAttributes`, add docs for `Wezterm.font_with_fallback()`
@KevinSilvester KevinSilvester marked this pull request as ready for review April 21, 2026 16:42
@KevinSilvester KevinSilvester changed the title Fonts feat(fonts): updated font related type defs and doc comments + added missing doc for Wezterm.font_with_fallback Apr 21, 2026
Comment thread lua/wezterm/types/wezterm.lua Outdated
Comment thread lua/wezterm/types/wezterm.lua
@DrKJeff16 DrKJeff16 self-assigned this Apr 21, 2026
Co-authored-by: Guennadi Maximov C <g.maxc.fox@protonmail.com>
Signed-off-by: KevinSilvester <56918431+KevinSilvester@users.noreply.github.com>

@DrKJeff16 DrKJeff16 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you!

@DrKJeff16 DrKJeff16 merged commit 9dd5519 into DrKJeff16:main Apr 21, 2026
1 check passed
@DrKJeff16 DrKJeff16 added the merged This PR has been merged successfully! label May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged This PR has been merged successfully!

Projects

Development

Successfully merging this pull request may close these issues.

2 participants