zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
49.59k stars 3.04k forks source link

`buffer_font_fallbacks` doesn't seem to work under Linux #17254

Open Frefreak opened 2 months ago

Frefreak commented 2 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

add buffer_font_fallbacks in settings doesn't look like doing anything.

{
  "telemetry": {
    "metrics": false
  },
  "vim_mode": true,
  "ui_font_size": 16,
  "buffer_font_size": 16,
  "buffer_font_family": "FantasqueSansM Nerd Font",
  "buffer_font_fallbacks": ["Source Han Sans SC"],
  "buffer_line_height": "standard",
  "theme": {
    "mode": "system",
    "light": "One Light",
    "dark": "Dracula"
  },
  "experimental.theme_overrides": {
    "background": "#282a36ff",
    "title_bar.background": "#141119ff",
    "title_bar.inactive_background": "#1c1d26ff",
    "status_bar.background": "#141119ff"
  }
}

buffer_font_fallbacks doesn't work. Additionally during typing the auto-completed font name list seems incomplete, but even the fonts that do show up in the auto-complete don't work."

Environment

Zed: v0.149.5 (Zed) OS: Linux Wayland arch unknown Memory: 30.7 GiB Architecture: x86_64 GPU: NVIDIA GeForce RTX 3060 || NVIDIA || 560.35.03

If applicable, add mockups / screenshots to help explain present your vision of the feature

image

The text for the text test is correct, but for 测试 it is the same as not specifying fallback font.

it should display like this: output this is produced with:

pango-view --markup --text='<span font="Source Han Sans SC 24">测试 </span><span font="FantasqueSansM Nerd Font 24">test</span>' --output=output.png

If applicable, attach your Zed.log file to this issue.

Zed.log

2024-09-02T10:42:57.304982429+08:00 [INFO] open paths ["/home/adv_zxy/asdf.txt"]
2024-09-02T10:43:36.295301368+08:00 [ERROR] oneshot canceled
2024-09-02T10:43:43.148347631+08:00 [INFO] ========== starting zed ==========
2024-09-02T10:43:43.19888085+08:00 [INFO] perform;
2024-09-02T10:43:43.198975189+08:00 [INFO] authenticate;
2024-09-02T10:43:43.199059248+08:00 [INFO] Opening main db
2024-09-02T10:43:43.199125203+08:00 [INFO] read_command;
2024-09-02T10:43:43.199621544+08:00 [INFO] new;
2024-09-02T10:43:43.199700664+08:00 [INFO] socket reader;
2024-09-02T10:43:43.200252289+08:00 [INFO] keep_updated;
2024-09-02T10:43:43.201074077+08:00 [INFO] Using git binary path: None
2024-09-02T10:43:43.230376531+08:00 [INFO] initializing context server client
2024-09-02T10:43:43.230483223+08:00 [INFO] Registering built-in prompt template: content_prompt
2024-09-02T10:43:43.230720112+08:00 [INFO] Registering built-in prompt template: edit_workflow
2024-09-02T10:43:43.231023116+08:00 [INFO] Registering built-in prompt template: step_resolution
2024-09-02T10:43:43.231442832+08:00 [INFO] Registering built-in prompt template: terminal_assistant_prompt
2024-09-02T10:43:43.231718023+08:00 [INFO] No prompt template overrides directory found at /home/adv_zxy/.local/share/zed/prompt_overrides. Using built-in prompts.
2024-09-02T10:43:43.232192362+08:00 [INFO] extensions updated. loading 2, reloading 0, unloading 0
2024-09-02T10:43:43.235768078+08:00 [INFO] performance metrics display disabled
2024-09-02T10:43:43.235852729+08:00 [INFO] activate is not implemented on Linux, ignoring the call
2024-09-02T10:43:43.237242733+08:00 [INFO] perform;
2024-09-02T10:43:43.237313858+08:00 [INFO] authenticate;
2024-09-02T10:43:43.237381636+08:00 [INFO] read_command;
2024-09-02T10:43:43.237886754+08:00 [INFO] socket reader;
2024-09-02T10:43:43.240268397+08:00 [ERROR] DBus error service error org.freedesktop.zbus.Error: The name is not activatable
2024-09-02T10:43:43.240426267+08:00 [INFO] Opening main db
2024-09-02T10:43:43.243447833+08:00 [INFO] set environment variables from shell:/usr/bin/fish, path:/home/adv_zxy/.local/share/gem/ruby/3.0.0/bin:/home/adv_zxy/rainbow/rainbow/web/node_modules/@tencent/tnpm/bin:/home/adv_zxy/.local/bin:/home/adv_zxy/bin:/home/adv_zxy/.ghcup/bin:/home/adv_zxy/go/bin:/home/adv_zxy/.cargo/bin:/usr/share/bcc/tools:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/android-ndk:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/adv_zxy/.cabal/bin:/home/adv_zxy/.ft:/home/adv_zxy/.ft:/home/adv_zxy/.ft
2024-09-02T10:43:43.262760905+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:43:43.262840275+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:43:43.262948029+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:43:43.262997653+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:43:43.263047638+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:43:43.263099647+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:43:43.263146355+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:43:43.263191871+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:43:43.263237658+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:43:43.263293334+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:43:43.269666913+08:00 [WARN] Theme "Dracula" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2024-09-02T10:43:43.271171214+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:43:43.300316249+08:00 [INFO] Enabling Vulkan Portability
2024-09-02T10:43:43.300355323+08:00 [INFO] Enabling color space support
2024-09-02T10:43:43.306160505+08:00 [INFO] Adapter "NVIDIA GeForce RTX 3060"
2024-09-02T10:43:43.306203266+08:00 [INFO] Ray tracing is supported
2024-09-02T10:43:43.425031528+08:00 [INFO] Using surface present mode MAILBOX
2024-09-02T10:43:43.425070151+08:00 [WARN] Unable to forbid exclusive full screen
2024-09-02T10:43:43.426032795+08:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-09-02T10:43:43.426060628+08:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-09-02T10:43:43.426084483+08:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: PreMultiplied }
2024-09-02T10:43:43.433040716+08:00 [INFO] Using GPU: GPUSpecs { is_software_emulated: false, device_name: "NVIDIA GeForce RTX 3060", driver_name: "NVIDIA", driver_info: "560.35.03" }
2024-09-02T10:43:43.435420026+08:00 [INFO] Using surface present mode MAILBOX
2024-09-02T10:43:43.435475992+08:00 [WARN] Unable to forbid exclusive full screen
2024-09-02T10:43:43.435570501+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:43:43.437020589+08:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: Ignored }
2024-09-02T10:43:43.445693686+08:00 [INFO] Using surface present mode MAILBOX
2024-09-02T10:43:43.445741166+08:00 [WARN] Unable to forbid exclusive full screen
2024-09-02T10:43:43.475485287+08:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: PreMultiplied }
2024-09-02T10:43:43.48242045+08:00 [INFO] Using surface present mode MAILBOX
2024-09-02T10:43:43.482469032+08:00 [WARN] Unable to forbid exclusive full screen
2024-09-02T10:43:43.493967264+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:43:43.494443416+08:00 [INFO] Opening main db
2024-09-02T10:43:43.495451597+08:00 [INFO] time to first window draw: 347.289989ms
2024-09-02T10:43:43.495648069+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:43:43.495711259+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:43:43.495748209+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:43:43.495784468+08:00 [ERROR] failed to canonicalize root path: No such file or directory (os error 2)
2024-09-02T10:43:43.513063374+08:00 [INFO] Opening main db
2024-09-02T10:43:43.513487037+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:43:43.536846067+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:43:43.643378104+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:43:43.891713756+08:00 [INFO] Node runtime install_if_needed
2024-09-02T10:43:43.970294711+08:00 [INFO] starting language server. binary path: "/home/adv_zxy/.local/share/zed/node/node-v22.5.1-linux-x64/bin/node", working directory: "/", args: ["/home/adv_zxy/.local/share/zed/copilot/copilot-v0.5.0/dist/agent.js", "--stdio"]
2024-09-02T10:43:44.293905715+08:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-09-02T02:43:44.290Z] Agent service starting",
  "metadataStr": "[DEBUG] [agent] [2024-09-02T02:43:44.290Z]",
  "extra": [
    "Agent service starting"
  ]
}
2024-09-02T10:43:44.295600908+08:00 [INFO] Language server with id 0 sent unhandled notification client/registerCapability:
{
  "registrations": [
    {
      "id": "aea03361-d467-4f2b-97a2-7626829ee6fd",
      "method": "workspace/didChangeWorkspaceFolders",
      "registerOptions": {}
    }
  ]
}
2024-09-02T10:43:45.008153589+08:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 1,
  "message": "[INFO] [auth] [2024-09-02T02:43:45.007Z] Invalid copilot token: missing token: 403 ",
  "metadataStr": "[INFO] [auth] [2024-09-02T02:43:45.007Z]",
  "extra": [
    "Invalid copilot token: missing token: 403 "
  ]
}
2024-09-02T10:43:45.008254971+08:00 [INFO] Language server with id 0 sent unhandled notification window/showMessageRequest:
{
  "type": 2,
  "message": "No access to GitHub Copilot found. You are currently logged in as Frefreak.",
  "actions": [
    {
      "title": "Sign up for GitHub Copilot"
    },
    {
      "title": "Dismiss"
    }
  ]
}
2024-09-02T10:43:45.015053316+08:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-09-02T02:43:45.010Z] Telemetry initialized",
  "metadataStr": "[DEBUG] [agent] [2024-09-02T02:43:45.010Z]",
  "extra": [
    "Telemetry initialized"
  ]
}
2024-09-02T10:44:01.622605426+08:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-09-02T10:44:01.636841848+08:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-09-02T10:44:01.655357791+08:00 [INFO] Creating a descriptor pool for at most 256 sets
2024-09-02T10:44:01.670070034+08:00 [INFO] Creating a descriptor pool for at most 256 sets
2024-09-02T10:44:04.952611478+08:00 [INFO] open paths ["/home/adv_zxy/.config/zed/settings.json"]
2024-09-02T10:44:04.956341498+08:00 [INFO] Initializing default prettier with plugins {}
2024-09-02T10:44:04.956415748+08:00 [INFO] starting language servers for JSONC: json-language-server
2024-09-02T10:44:04.956466414+08:00 [INFO] starting language server "json-language-server", path: "/home/adv_zxy/.config/zed/settings.json", id: 1
2024-09-02T10:44:04.956626277+08:00 [INFO] Initializing default prettier with plugins {}
2024-09-02T10:44:04.956682644+08:00 [INFO] starting language servers for JSONC: json-language-server
2024-09-02T10:44:04.965028471+08:00 [INFO] fetching latest version of language server "json-language-server"
2024-09-02T10:44:04.965113513+08:00 [INFO] Node runtime install_if_needed
2024-09-02T10:44:04.984680718+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:44:05.64298928+08:00 [INFO] downloading language server "json-language-server"
2024-09-02T10:44:05.643393175+08:00 [INFO] Node runtime install_if_needed
2024-09-02T10:44:05.72581609+08:00 [INFO] starting language server. binary path: "/home/adv_zxy/.local/share/zed/node/node-v22.5.1-linux-x64/bin/node", working directory: "/home/adv_zxy/.config/zed", args: ["/home/adv_zxy/.local/share/zed/languages/json-language-server/node_modules/vscode-langservers-extracted/bin/vscode-json-language-server", "--stdio"]
2024-09-02T10:44:21.083116548+08:00 [INFO] Waiting for default prettier to install
2024-09-02T10:44:21.083189035+08:00 [INFO] Starting prettier at path "/home/adv_zxy/.local/share/zed/prettier"
2024-09-02T10:44:21.083273435+08:00 [INFO] Node runtime install_if_needed
2024-09-02T10:44:21.16204811+08:00 [INFO] starting language server. binary path: "/home/adv_zxy/.local/share/zed/node/node-v22.5.1-linux-x64/bin/node", working directory: "/home/adv_zxy/.local/share/zed/prettier", args: ["/home/adv_zxy/.local/share/zed/prettier/prettier_server.js", "/home/adv_zxy/.local/share/zed/prettier"]
2024-09-02T10:44:21.232600573+08:00 [INFO] Started default prettier in "/home/adv_zxy/.local/share/zed/prettier"
2024-09-02T10:44:21.373251275+08:00 [INFO] starting language servers for JSONC: json-language-server
2024-09-02T10:44:21.374255188+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:44:44.944041647+08:00 [INFO] starting language servers for JSONC: json-language-server
2024-09-02T10:44:44.944907679+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:44:48.568783206+08:00 [INFO] starting language servers for JSONC: json-language-server
2024-09-02T10:44:48.569615484+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:48:38.139869021+08:00 [INFO] starting language servers for JSONC: json-language-server
2024-09-02T10:48:38.140818802+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:48:52.207681401+08:00 [INFO] starting language servers for JSONC: json-language-server
2024-09-02T10:48:52.211228497+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:53:32.339873993+08:00 [INFO] starting language servers for JSONC: json-language-server
2024-09-02T10:53:32.340702435+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:53:40.658357131+08:00 [INFO] starting language servers for JSONC: json-language-server
2024-09-02T10:53:40.664639618+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-02T10:53:43.800879307+08:00 [INFO] starting language servers for JSONC: json-language-server
2024-09-02T10:53:43.801739309+08:00 [WARN] request completed with error: failed to connect to the server

JunkuiZhang commented 2 months ago

It's a Windows and macOS only feature.

Frefreak commented 2 months ago

Is there any plan to support linux or workaround?

JunkuiZhang commented 2 months ago

Is there any plan to support linux or workaround?

Zed team plans to move from Cosmic Text System to HarfBuzz, which will support this featuren then.