KEMBAR78
Implement a canvas renderer · Issue #935 · xtermjs/xterm.js · GitHub
Skip to content

Implement a canvas renderer #935

@Tyriar

Description

@Tyriar

A work in progress is already well under way. The performance benefits seem to far outweigh anything that can be accomplished in the DOM.

The main drawbacks of using canvas over the DOM:

  • We lose functionality provided by text and node in the DOM, namely:
    • Selection & context menus, this doesn't matter as we already reimplemented them to work around then DOM getting in the way
    • Links just work in the DOM; create an <a> and just put it somewhere. This needs more handling code to work in a canvas.
  • Zooming in will blur the text, so it's best used at 100% page scale

I'll list most of the improvements and bug fixes that canvas provided in the PR which should be out soon 😄

Marking as breaking as we need new API around colors and font styles which will be managed in TS.

Metadata

Metadata

Assignees

Labels

breaking-changeBreaks API and requires a major version bumptype/enhancementFeatures or improvements to existing features

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions