|
/** |
|
* This contains the definitions of the primarily used box drawing characters as vector shapes. The |
|
* reason these characters are defined specially is to avoid common problems if a user's font has |
|
* not been patched with powerline characters and also to get pixel perfect rendering as rendering |
|
* issues can occur around AA/SPAA. |
|
* |
|
* The line variants draw beyond the cell and get clipped to ensure the end of the line is not visible. |
|
* |
|
* Original symbols defined in https://github.com/powerline/fontpatcher |
|
*/ |
|
export const powerlineDefinitions: { [index: string]: IVectorShape } = { |
|
// Right triangle solid |
|
'\u{E0B0}': { d: 'M0,0 L1,.5 L0,1', type: VectorType.FILL, rightPadding: 2 }, |
|
// Right triangle line |
|
'\u{E0B1}': { d: 'M-1,-.5 L1,.5 L-1,1.5', type: VectorType.STROKE, leftPadding: 1, rightPadding: 1 }, |
|
// Left triangle solid |
|
'\u{E0B2}': { d: 'M1,0 L0,.5 L1,1', type: VectorType.FILL, leftPadding: 2 }, |
|
// Left triangle line |
|
'\u{E0B3}': { d: 'M2,-.5 L0,.5 L2,1.5', type: VectorType.STROKE, leftPadding: 1, rightPadding: 1 }, |
|
// Right semi-circle solid, |
|
'\u{E0B4}': { d: 'M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0', type: VectorType.FILL, rightPadding: 1 }, |
|
// Right semi-circle line, |
|
'\u{E0B5}': { d: 'M0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0', type: VectorType.STROKE, rightPadding: 1 }, |
|
// Left semi-circle solid, |
|
'\u{E0B6}': { d: 'M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0', type: VectorType.FILL, leftPadding: 1 }, |
|
// Left semi-circle line, |
|
'\u{E0B7}': { d: 'M1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0', type: VectorType.STROKE, leftPadding: 1 } |
|
}; |
|
|
VS Code issue showing bad rendering when rendering the glyph from the font: microsoft/vscode#163000
We should support custom rendering of
e0b8throughe0bfpowerline symbols:Code pointer:
xterm.js/src/browser/renderer/shared/CustomGlyphs.ts
Lines 346 to 374 in f381783