Move webgl-specific shared code into addon

Never got moved when canvas addon was removed
This commit is contained in:
Daniel Imms
2025-01-08 10:35:39 -08:00
parent dce403afd9
commit d70f2a462c
14 changed files with 29 additions and 26 deletions
+12
View File
@@ -0,0 +1,12 @@
/**
* Copyright (c) 2017 The xterm.js authors. All rights reserved.
* @license MIT
*/
import { isFirefox, isLegacyEdge } from 'common/Platform';
export const DIM_OPACITY = 0.5;
// The text baseline is set conditionally by browser. Using 'ideographic' for Firefox or Legacy Edge
// would result in truncated text (Issue 3353). Using 'bottom' for Chrome would result in slightly
// unaligned Powerline fonts (PR 3356#issuecomment-850928179).
export const TEXT_BASELINE: CanvasTextBaseline = isFirefox || isLegacyEdge ? 'bottom' : 'ideographic';