xtermjs/xterm.js

[WebGL and Canvas Rendering] Font does not scale correctly with DPR higher than 1

オープン

#4,728 opened on 2023/08/25

 (13 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (1,574 件のフォーク)batch import
area/addon/webglarea/mobilehelp wantedtype/bug

Repository metrics

Stars
 (16,196 個のスター)
PR merge metrics
 (平均マージ 2d 10h) (30d で 16 merged PRs)

説明

When using WebGL or Canvas addons and displaying on a device with a DPR higher than 1 the text inside the container becomes larger than it should be.

DPR 4 image

DPR 1 image

When using WebGL I also get this error in Firefox when I set the DPR higher than 1.

WebGL warning: drawElementsInstanced: Drawing to a destination rect smaller than the viewport rect. (This warning will only be given once)

Details

  • Firefox and Brave Desktop with Responsive Design Mode enabled both exhibit this
  • OS version: Fedora 38
  • xterm.js version: 5.2.1
  • Canvas addon version: 0.4.0
  • WebGL addon version: 0.15.0
  • I'm using VueJS 3 to build my SPA

Steps to reproduce

  1. Create a site that uses xtermjs with either canvas or webgl
  2. Test the site with Responsive Design Mode

コントリビューターガイド