Skip to content

Commit 51952bd

Browse files
committed
update backend comparison
1 parent ab1f4b3 commit 51952bd

1 file changed

Lines changed: 22 additions & 17 deletions

File tree

src/backend/mod.rs

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
//! each with different performance characteristics and trade-offs:
55
//!
66
//! - [`WebGl2Backend`]: GPU-accelerated rendering powered by [beamterm][beamterm]. Uses prebuilt
7-
//! font atlases. Best performance, capable of 60fps on large terminals (300x100+).
7+
//! or runtime generated font atlases. Best performance, capable of 60fps on large terminals.
88
//!
99
//! - [`CanvasBackend`]: Canvas 2D API with full Unicode support via browser font rendering.
10-
//! Good fallback when WebGL2 isn't available or when dynamic character support is required.
11-
//! Does not support hyperlinks or text selection, but can render dynamic Unicode/emoji.
10+
//! Good fallback when WebGL2. Does not support hyperlinks or text selection, but can render
11+
//! dynamic Unicode/emoji.
1212
//!
1313
//! - [`DomBackend`]: Renders cells as HTML elements. Most compatible and accessible,
1414
//! supports hyperlinks, but slowest for large terminals.
@@ -17,24 +17,29 @@
1717
//!
1818
//! ## Backend Comparison
1919
//!
20-
//! | Feature | DomBackend | CanvasBackend | WebGl2Backend |
21-
//! |------------------------------|------------|---------------|------------------|
22-
//! | **60fps on large terminals** | ✗ | ✗ | ✓ |
23-
//! | **Memory Usage** | Highest | Medium | Lowest |
24-
//! | **Hyperlinks** | ✓ | ✗ | ✓ |
25-
//! | **Text Selection** | ✓ | ✗ | ✓ |
26-
//! | **Accessibility** | ✓ | Limited | Limited |
27-
//! | **Unicode/Emoji Support** | Full | Full | Limited to atlas |
28-
//! | **Dynamic Characters** | ✓ | ✓ | ✗ |
29-
//! | **Font Variants** | ✓ | Regular only | ✓ |
30-
//! | **Underline** | ✓ | ✗ | ✓ |
31-
//! | **Strikethrough** | ✓ | ✗ | ✓ |
32-
//! | **Browser Support** | All | All | Modern (2017+) |
20+
//! | Feature | DomBackend | CanvasBackend | WebGl2Backend |
21+
//! |------------------------------|------------|---------------|----------------|
22+
//! | **60fps on large terminals** | ✗ | ✗ | ✓ |
23+
//! | **Memory Usage** | Highest | Medium | Lowest |
24+
//! | **Hyperlinks** | ✓ | ✗ | ✓ |
25+
//! | **Text Selection** | ✓ | ✗ | ✓ |
26+
//! | **Accessibility** | ✓ | Limited | Limited |
27+
//! | **Unicode/Emoji Support** | Full | Full | Full¹ |
28+
//! | **Dynamic Characters** | ✓ | ✓ | ✓¹ |
29+
//! | **Font Variants** | ✓ | Regular only | ✓ |
30+
//! | **Underline** | ✓ | ✗ | ✓ |
31+
//! | **Strikethrough** | ✓ | ✗ | ✓ |
32+
//! | **Browser Support** | All | All | Modern (2017+) |
33+
//!
34+
//! ¹: The [dynamic font atlas](webgl2::WebGl2BackendOptions::dynamic_font_atlas) rasterizes
35+
//! glyphs on demand with full Unicode/emoji and font variant support. The
36+
//! [static font atlas](webgl2::WebGl2BackendOptions::font_atlas) is limited to glyphs
37+
//! included at atlas build time.
3338
//!
3439
//! ## Choosing a Backend
3540
//!
3641
//! - **WebGl2Backend**: Preferred for most applications - consumes the least amount of resources
37-
//! - **CanvasBackend**: When you need dynamic Unicode/emoji or must support non-WebGL2 browsers
42+
//! - **CanvasBackend**: When you must support non-WebGL2 browsers
3843
//! - **DomBackend**: When you need better accessibility or CSS styling
3944
4045
/// Canvas backend.

0 commit comments

Comments
 (0)