mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 08:03:19 +00:00
- Completion, parameter info and hover docs render in a tooltip container outside the editor, which carries its theme classes but not its inline style, so they used the default mono font at 13px. The editor font variables are now also provided as a theme; completion rows grow with the font size. - The Run and Debug consoles use the terminal's weights (the editor's main and bold weights when the terminal follows the editor font). - "Show only monospaced fonts" is a setting shared by Editor › Font and Tools › Terminal instead of resetting every time the page opens. Fixes #3621
25 lines
906 B
TypeScript
25 lines
906 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { consoleFontOf } from "./consoleFont";
|
|
|
|
const terminal = (useEditorFont: boolean) => ({
|
|
useEditorFont,
|
|
fontFamily: "Menlo",
|
|
fallbackFontFamily: "",
|
|
fontSize: 13,
|
|
});
|
|
const editor = { fontFamily: "Fira Code", fontSize: 15, fontWeight: 500, boldFontWeight: 800 };
|
|
|
|
describe("console font", () => {
|
|
it("uses the editor's weights when the terminal follows the editor font", () => {
|
|
const font = consoleFontOf(terminal(true), editor);
|
|
expect(font).toMatchObject({ size: 15, weight: 500, boldWeight: 800 });
|
|
expect(font.family).toContain("Fira Code");
|
|
});
|
|
|
|
it("uses regular and bold with the terminal's own font, as the terminal does", () => {
|
|
const font = consoleFontOf(terminal(false), editor);
|
|
expect(font).toMatchObject({ size: 13, weight: 400, boldWeight: 700 });
|
|
expect(font.family).toContain("Menlo");
|
|
});
|
|
});
|