Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The terminal has a strange problem displaying the Fira Code character #238227

Open
JYRowe opened this issue Jan 19, 2025 · 2 comments
Open

The terminal has a strange problem displaying the Fira Code character #238227

JYRowe opened this issue Jan 19, 2025 · 2 comments
Assignees
Labels
new release Issues found in a recent release of VS Code

Comments

@JYRowe
Copy link

JYRowe commented Jan 19, 2025

Type: Bug

  1. Use this font.
  2. Run the following cpp program compiled by gcc 14.2.0 (compilation command: g++ Test.cpp -o Test.exe).
  3. And then something weird like this will happen:

I'm sure it's not a Fira Code or Windows Terminal (PowerShell) issue as such:


My cpp file:

#include <bits/stdc++.h>
using namespace std;

int n, m;

#define N 7005

char a[N][N];

void dfs(int x, int y, int t) {
    if (t == 1) return;
    t /= 3;
    a[x + t][y] = a[x][y + t] = a[x + t][y + t] = a[x + t + t][y + t] = a[x + t][y + t + t] = a[x][y];
    a[x][y] = a[x + t + t][y] = a[x][y + t + t] = a[x + t + t][y + t + t] = '.';
    for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) dfs(x + i * t, y + j * t, t);
}

int main() {
    // freopen("Test.out", "w", stdout);
    cin >> n;
    m = 1;
    for (int i = 1; i <= n; i++) m *= 3;
    a[1][1] = '#';
    dfs(1, 1, m);
    for (int i = 1; i <= m; i++) {
        for (int j = 1; j <= m; j++)
            cout << a[i][j];
        cout << endl;
    }
    return 0;
}

My settings.json:

{
    "files.autoSave": "afterDelay",
    "editor.fontFamily": "Fira Code, LXGW WenKai Mono GB, Consolas , 'Courier New', monospace",
    "editor.fontSize": 19,
    "terminal.integrated.enableMultiLinePasteWarning": "never",
    "editor.fontLigatures": true,
    "editor.mouseWheelZoom": true,
    "explorer.sortOrder": "type",
    "redhat.telemetry.enabled": true,
    "code-runner.executorMap": {
        "javascript": "node",
        "java": "cd $dir && javac $fileName && java $fileNameWithoutExt",
        "c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "zig": "zig run",
        // "cpp": "cd $dir && g++ $fileName -o $fileNameWithoutExt -std=c++2b -Wall -Wextra -Wpedantic -Wshadow -Wno-sign-compare -Wno-unused-value -Wno-unused-but-set-variable -Wno-misleading-indentation -fsanitize=undefined -O2 -DJYR && $dir$fileNameWithoutExt",
        "cpp": "cd $dir && g++ $fileName -o $fileNameWithoutExt -std=c++2b -Wall -Wextra -Wpedantic -Wshadow -Wno-sign-compare -Wno-unused-value -Wno-unused-but-set-variable -Wno-misleading-indentation -Wno-unused-result -O2 -DJYR && $dir$fileNameWithoutExt",
        "objective-c": "cd $dir && gcc -framework Cocoa $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "php": "php",
        "python": "python -u",
        "perl": "perl",
        "perl6": "perl6",
        "ruby": "ruby",
        "go": "go run",
        "lua": "lua",
        "groovy": "groovy",
        "powershell": "powershell -ExecutionPolicy ByPass -File",
        "bat": "cmd /c",
        "shellscript": "bash",
        "fsharp": "fsi",
        "csharp": "scriptcs",
        "vbscript": "cscript",
        "typescript": "ts-node",
        "coffeescript": "coffee",
        "scala": "scala",
        "swift": "swift",
        "julia": "julia",
        "crystal": "crystal",
        "ocaml": "ocaml",
        "r": "Rscript",
        "applescript": "osascript",
        "clojure": "lein exec",
        "haxe": "haxe --cwd $dirWithoutTrailingSlash --run $fileNameWithoutExt",
        "rust": "cd $dir && rustc $fileName && $dir$fileNameWithoutExt",
        "racket": "racket",
        "scheme": "csi -script",
        "ahk": "autohotkey",
        "autoit": "autoit3",
        "dart": "dart",
        "pascal": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt",
        "d": "cd $dir && dmd $fileName && $dir$fileNameWithoutExt",
        "haskell": "runghc",
        "nim": "nim compile --verbosity:0 --hints:off --run",
        "lisp": "sbcl --script",
        "kit": "kitc --run",
        "v": "v run",
        "sass": "sass --style expanded",
        "scss": "scss --style expanded",
        "less": "cd $dir && lessc $fileName $fileNameWithoutExt.css",
        "FortranFreeForm": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "fortran-modern": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "fortran_fixed-form": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "fortran": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "sml": "cd $dir && sml $fileName"
    },
    "cph.general.defaultLanguage": "cpp",
    
    "cph.general.firstTime": false,
    "cph.language.cpp.SubmissionCompiler": "GNU G++14 6.4.0",   
    "cph.language.cpp.Args": "-std=c++14 -O2 -lm -static",
    "doxdocgen.generic.authorEmail": "cooluoCN@outlook.com",
    "doxdocgen.generic.authorName": "cooluo",
    "vscoq.path": "D:\\\\Coq-Platform~8.17~2023.08\\\\bin",
    "editor.accessibilitySupport": "off",
    "editor.inlayHints.enabled": "off",
    "workbench.colorCustomizations": {
        "editor.lineHighlightBackground": "#1073cf2d",
        "editor.lineHighlightBorder": "#9fced11f"
    },
    "editor.wordWrap": "off",
    "diffEditor.wordWrap": "off",
    "editor.guides.indentation": false,
    "editor.guides.bracketPairs": false,

    
    "latex-workshop.latex.autoBuild.run": "never",
    "latex-workshop.showContextMenu": true,
    "latex-workshop.intellisense.package.enabled": true,
    "latex-workshop.message.error.show": false,
    "latex-workshop.message.warning.show": false,
    "latex-workshop.latex.tools": [
        {
            "name": "xelatex",
            "command": "xelatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOCFILE%"
            ]
        },
        {
            "name": "pdflatex",
            "command": "pdflatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOCFILE%"
            ]
        },
        {
            "name": "latexmk",
            "command": "latexmk",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "-pdf",
                "-outdir=%OUTDIR%",
                "%DOCFILE%"
            ]
        },
        {
            "name": "bibtex",
            "command": "bibtex",
            "args": [
                "%DOCFILE%"
            ]
        }
    ],
    "latex-workshop.latex.recipes": [
        {
            "name": "XeLaTeX",
            "tools": [
                "xelatex"
            ]
        },
        {
            "name": "xelatex*2",
            "tools": [
                "xelatex",
                "xelatex"
            ]
        },
        {
            "name": "PDFLaTeX",
            "tools": [
                "pdflatex"
            ]
        },
        {
            "name": "BibTeX",
            "tools": [
                "bibtex"
            ]
        },
        {
            "name": "LaTeXmk",
            "tools": [
                "latexmk"
            ]
        },
        {
            "name": "xelatex -> bibtex -> xelatex*2",
            "tools": [
                "xelatex",
                "bibtex",
                "xelatex",
                "xelatex"
            ]
        },
        {
            "name": "pdflatex -> bibtex -> pdflatex*2",
            "tools": [
                "pdflatex",
                "bibtex",
                "pdflatex",
                "pdflatex"
            ]
        },
    ],
    "latex-workshop.latex.clean.fileTypes": [
        "*.aux",
        "*.bbl",
        "*.blg",
        "*.idx",
        "*.ind",
        "*.lof",
        "*.lot",
        "*.out",
        "*.toc",
        "*.acn",
        "*.acr",
        "*.alg",
        "*.glg",
        "*.glo",
        "*.gls",
        "*.ist",
        "*.fls",
        "*.log",
        "*.fdb_latexmk"
    ],
    "latex-workshop.latex.autoClean.run": "onFailed",
    "latex-workshop.latex.recipe.default": "lastUsed",
    "latex-workshop.view.pdf.internal.synctex.keybinding": "ctrl-click",

    
    
    "latex-workshop.view.pdf.viewer": "external",
    
    "latex-workshop.view.pdf.ref.viewer":"auto",
    
    "latex-workshop.view.pdf.external.viewer.command": "D:\\SumatraPDF\\SumatraPDF.exe", 
    
    "latex-workshop.view.pdf.external.viewer.args": [
        "%PDF%"
    ],
    
    "latex-workshop.view.pdf.external.synctex.command": "D:\\SumatraPDF\\SumatraPDF.exe", 
    
    "latex-workshop.view.pdf.external.synctex.args": [
        "-forward-search",
        "%TEX%",
        "%LINE%",
        "-reuse-instance",
        "-inverse-search",
        "\"D:\\SumatraPDF\\SumatraPDF.exe\" \"D:/Microsoft VS Code/resources/app/out/cli.js\" -r -g \"%f:%l\"", 
        "%PDF%"
    ],
    "editor.minimap.showSlider": "always",
    "markdown-preview-enhanced.enablePreviewZenMode": false,
    "[latex]": {
        "editor.defaultFormatter": "James-Yu.latex-workshop"
    },
    "markdown-preview-enhanced.revealjsTheme": "none.css",
    "markdown-preview-enhanced.previewTheme": "github-light.css",
    "workbench.colorTheme": "Default Light Modern",
    "C_Cpp.vcFormat.newLine.beforeOpenBrace.function": "newLine",
    "C_Cpp.vcFormat.indent.accessSpecifiers": true,
    "C_Cpp.vcFormat.indent.braces": true,
    "C_Cpp.vcFormat.newLine.beforeOpenBrace.block": "newLine",
    "C_Cpp.vcFormat.newLine.beforeOpenBrace.lambda": "newLine",
    "C_Cpp.vcFormat.newLine.beforeOpenBrace.namespace": "newLine",
    "C_Cpp.vcFormat.newLine.beforeOpenBrace.type": "newLine",
    "C_Cpp.vcFormat.newLine.closeBraceSameLine.emptyFunction": true,
    "C_Cpp.vcFormat.newLine.closeBraceSameLine.emptyType": true,
    "C_Cpp.vcFormat.space.beforeFunctionOpenParenthesis": "insert",
    "C_Cpp.vcFormat.space.beforeLambdaOpenParenthesis": true,
    "Codegeex.Privacy": true,
    "[markdown]": {
        "editor.defaultFormatter": "yzhang.markdown-all-in-one"
    },
    "diffEditor.ignoreTrimWhitespace": false,
    "terminal.integrated.defaultProfile.windows": "PowerShell",
    "editor.unicodeHighlight.allowedLocales": {
        "zh-hans": true
    },
    "security.workspace.trust.untrustedFiles": "open",
    "markdown.extension.completion.enabled": true,
    "cmake.configureOnOpen": true,
    "cmake.pinnedCommands": [
        "workbench.action.tasks.configureTaskRunner",
        "workbench.action.tasks.runTask"
    ],
    "cmake.configureSettings": {
        "CMAKE_EXPORT_COMPILE_COMMANDS": "YES"
    },
    "Codegeex.Comment.LanguagePreference": "中文",
    "explorer.confirmDelete": false,
    "editor.cursorSmoothCaretAnimation": "on",
    "Codegeex.DisabledFor": {
        "markdown": true,
        "code-runner-output": true
    },
    "[html]": {
        "editor.defaultFormatter": "lonefy.vscode-JS-CSS-HTML-formatter"
    },
    "workbench.tree.enableStickyScroll": false,
    "doxdocgen.generic.order": [
        "file",
        "brief",
        "empty",
        "author",
        "version",
        "date",
        "empty",
        "copyright"
    ],
    "Codegeex.License": "",
    "Codegeex.EnableExtension": false,
    "blockman.n04ColorComboPreset": "Classic Light (Gradients)",
    "thiefBook.pageSize": 40,
    "thiefBook.currPageNumber": 0,
    "workbench.editor.empty.hint": "hidden",
    "indentRainbow.errorColor": "rgba(128,32,32,0.1)",
    "editor.cursorBlinking": "smooth",
    "indentRainbow.ignoreLinePatterns": [
        "/./g",
        "/../g",
        "/.../g",
        "/..../g",
        "/[ \t]* [*]/g",
        "/[ \t]+[/]{2}/g"
    ],
    "editor.smoothScrolling": true,
    "markdown.preview.fontFamily": "LXGW WenKai Mono GB, -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif",
    "terminal.integrated.fontLigatures": true,
    "terminal.integrated.suggest.enabled": true,
    "editor.trimAutoWhitespace": false,
    "cph.general.timeOut": 5000,
    "code-runner.ignoreSelection": true,
    "code-runner.runInTerminal": true
}

VS Code version: Code 1.96.4 (cd4ee3b, 2025-01-16T00:16:19.038Z)
OS version: Windows_NT x64 10.0.26100
Modes:

System Info
Item Value
CPUs 13th Gen Intel(R) Core(TM) i5-13420H (12 x 2611)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 15.73GB (4.24GB free)
Process Argv --crash-reporter-id 5b33a74c-717b-4323-ae95-926fe5c6ad0d
Screen Reader no
VM 0%
Extensions (36)
Extension Author (truncated) Version
codesnap adp 1.3.4
markdown-preview-github-styles bie 2.1.0
thief-book C-T 0.0.9
vscode-markdownlint Dav 0.58.2
competitive-programming-helper Div 2024.12.1735111696
python-extension-pack don 1.7.0
gitlens eam 16.2.0
prettier-vscode esb 11.0.0
code-runner for 0.12.2
latex-workshop Jam 10.7.5
better-cpp-syntax jef 1.27.1
Kotlin mat 1.7.1
vscode-language-pack-zh-hans MS- 1.96.2024121109
debugpy ms- 2024.15.2025011702
python ms- 2024.23.2025011501
vscode-pylance ms- 2025.1.100
jupyter ms- 2025.1.2024121801
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.0.21
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
remote-wsl ms- 0.88.5
cpptools ms- 1.23.3
cpptools-extension-pack ms- 1.3.0
indent-rainbow ode 8.3.1
better-markdown-latex-shortcuts Ora 2.4.2
remove-comments pli 1.2.2
any-rule rus 0.3.18
markdown-preview-enhanced shd 0.8.15
open-in-browser tec 2.0.0
graphviz-interactive-preview tin 0.3.5
pdf tom 1.2.2
errorlens use 3.22.0
autocomplete-english-word wus 0.1.7
markdown-pdf yza 1.5.0
markdown-all-in-one yzh 3.6.2

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt551:31179978
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
vscaat:30438848
c4g48928:30535728
azure-dev_surveyonecf:30548226
2i9eh265:30646982
962ge761:30959799
pythonnoceb:30805159
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupyter:31046869
2f103344:31071589
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc1:31192215
cf971741:31144450
iacca1:31171482
notype1cf:31157160
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624
dwoutputs:31217127

@JYRowe
Copy link
Author

JYRowe commented Jan 19, 2025

translated by deepl.com

@vs-code-engineering vs-code-engineering bot added the new release Issues found in a recent release of VS Code label Jan 19, 2025
@albertosantini
Copy link

I don't know if I correctly understood the issue.

Do you see any difference between the output of the integrated terminal and the Terminal?

If my assumption is correct, it is due to the ligatures in the integrated terminal.

"terminal.integrated.fontLigatures": true,
Try to set it to false.

Hope that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new release Issues found in a recent release of VS Code
Projects
None yet
Development

No branches or pull requests

3 participants