Skip to content

Conversation

Copy link

Copilot AI commented Sep 2, 2025

This PR adds a new "System Default" option to the emoji set chooser in TDesktop, allowing users to use their operating system's native emoji fonts instead of the bundled emoji sets (Twemoji, Android, JoyPixels).

What's Changed

New System Default Option:

  • Appears as the first option in Settings → Chat Settings → Choose Emoji Set
  • Uses the system's native emoji fonts without requiring any downloads
  • Works across all supported platforms (Windows, macOS, Linux)

Key Benefits:

  • No Downloads Required: Instantly available without downloading additional emoji files
  • Native System Integration: Uses Segoe UI Emoji on Windows, Apple Color Emoji on macOS, and Noto Color Emoji (or similar) on Linux
  • Reduced Storage: No need to store additional emoji set files for users who prefer system defaults
  • Better Performance: Leverages system-optimized emoji rendering

Technical Implementation

The implementation adds a special emoji set with ID -1 that bypasses the download mechanism:

const auto kSets = {
    Set{ { -1,   0,            0, "System Default" },  PreviewPath(0) },
    Set{ { 0,    0,            0, "Twemoji Yuki" },    PreviewPath(0) },
    // ... existing sets
};

When "System Default" is selected:

  1. The app immediately switches without downloading files
  2. Emoji rendering falls back to the system's native font stack
  3. The option shows as "Current set" when active

Cross-Platform Support

  • Windows: Uses Segoe UI Emoji or system default emoji font
  • macOS: Uses Apple Color Emoji
  • Linux: Uses available system emoji fonts (typically Noto Color Emoji)

Localization

The new option is properly localized using TDesktop's language system with the key lng_emoji_set_system_default, making it translatable into all supported languages.

This addresses user requests for a system-native emoji option while maintaining full compatibility with existing emoji set functionality.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Add System Default (id=-1) entry to kSets array
- Handle system default case in ComputeState to always show as Ready
- Modify LoadAndSwitchTo to skip download for system default
- Add lng_emoji_set_system_default language string
- Update setupLabels to use localized name for system default

Co-authored-by: Revincx <25524750+Revincx@users.noreply.github.com>
Copilot AI changed the title [WIP] Tdesktop currently bundled some emoji fonts (such as Tewmoji) to render its user interface, and there is an option to choose which emoji set to use in the settings (Settings->Chat Settings->Choose Emoji Set). Try to add a new option "System Default" to... Add "System Default" emoji set option to use native system fonts Sep 2, 2025
Copilot AI requested a review from Revincx September 2, 2025 03:23
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