question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. Itย collects links to all the places you might be looking at while hunting down a tough bug.

And, if youโ€™re still stuck at the end, weโ€™re happy to hop on a call to see how we can help out.

Some emojis not displaying correctly in VSCode macOS

See original GitHub issue

Steps to Reproduce:

Problem 1: Some emojis are displaying as small black and white images. Iโ€™m expecting them to paste normally (same size as other pasted emojis, with color).

  1. Copy these emojis into any file in VS Code:
    • โš™๏ธ :gear:
    • โšก๏ธ :zap:
    • โ™ป๏ธ :recycle:
    • โœ”๏ธ :heavy_check_mark:
    • โœ๏ธ :pencil2:
    • โ™ฟ๏ธ :wheelchair:
  2. You will see that they all look like this: Screen Shot 2021-03-13 at 10 27 29 PM
  3. I havenโ€™t tested all emojis. But most others seem to be displaying as expected. For example, Screen Shot 2021-03-13 at 10 31 21 PM
  4. Iโ€™ve copied and pasted emojis from many different websites. I get the same results each time.

Problem 2: The reason that I am adding these emojis to my project is to configure git commit prompts using commitizen, specifically with cz-customizable. When the git commit prompts are generated in my terminal, some emojis show inaccurate spacing. Additionally, all of the emojis that are displayed without color in VS Code files are being displayed in Terminal in the same way (no color, inconsistent sizing)

  1. Iโ€™m adding emojis specifically to my .cz-config.js file (you can see an example of someone else doing this here).
My .cz-config.js file
module.exports = {
    types: [
        {
            value: 'chore',
            name: 'chore:      โš™๏ธ Build process or supporting tool changes',
        },
        {
            value: 'ci',
            name: 'ci:         ๐Ÿš€ CI-related changes',
        },
        {
            value: 'docs',
            name: 'docs:       ๐Ÿ“š Documentation updates',
        },
        {
            value: 'feat',
            name: 'feat:       โญ Adds functionality',
        },
        {
            value: 'fix',
            name: 'fix:        ๐Ÿž Fixes a bug',
        },
        {
            value: 'perf',
            name: 'perf:       โšก๏ธ Changes that improve performance',
        },
        {
            value: 'refactor',
            name: 'refactor:   โ™ป๏ธ Neither fixes a bug nor adds functionality',
        },
        {
            value: 'release',
            name: 'release:    ๐Ÿ”– Releases a new version',
        },
        {
            value: 'setup',
            name: 'setup:      ๐ŸŽ‰ Initial setup',
        },
        {
            value: 'style',
            name: 'style:      ๐ŸŽจ Adds or updates styles',
        },
        {
            value: 'test',
            name: 'test:       ๐Ÿงช Adds or updates tests',
        },
        {
            value: 'ux',
            name: 'ux:         ๐Ÿšธ Changes that improve user experience',
        },
    ],
    scopes: [
        {
            value: 'wip',
            name: 'wip:    ๐Ÿšง WIP',
        },
        {
            value: 'review',
            name: 'review: ๐Ÿ’ฏ Code review changes',
        },
    ],
    allowTicketNumber: false,
    scopeOverrides: {
        chore: [
            {
                value: 'add-dep',
                name: 'add-dep:    โž• Adds dependencies',
            },
            {
                value: 'analytics',
                name: 'analytics:  ๐Ÿ“ˆ Adds or updates analytics',
            },
            {
                value: 'config',
                name: 'config:     ๐Ÿ› ๏ธ Adds or updates configuration files',
            },
            {
                value: 'downgrade',
                name: 'downgrade:  โฌ‡๏ธ Downgrades dependencies',
            },
            {
                value: 'errors',
                name: 'errors:     ๐Ÿฅ… Changes that improve error handling',
            },
            {
                value: 'ignore',
                name: 'ignore:     ๐Ÿ™ˆ Adds or updates .*ignore files',
            },
            {
                value: 'merge',
                name: 'merge:      ๐Ÿ”€ Merge branches',
            },
            {
                value: 'pin-dep',
                name: 'pin-dep:    ๐Ÿ“Œ Pins dependencies to specific versions',
            },
            {
                value: 'rem-dep',
                name: 'rem-dep:    โž– Removes dependencies',
            },
            {
                value: 'scripts',
                name: 'scripts:    ๐Ÿ“œ Adds or updates development scripts',
            },
            {
                value: 'security',
                name: 'security:   ๐Ÿ”’ Security-related changes',
            },
            {
                value: 'upgrade',
                name: 'upgrade:    โฌ†๏ธ Upgrades dependencies',
            },
        ],
        docs: [
            {
                value: 'config',
                name: 'config: ๐Ÿ› ๏ธ Adds or updates configuration documentation',
            },
            {
                value: 'logs',
                name: 'logs:   ๐Ÿ”Š Adds or updates logs',
            },
            {
                value: 'meta',
                name: 'meta:   ๐Ÿ“– Adds or updates metadata',
            },
        ],
        fix: [
            {
                value: 'downgrade',
                name: 'downgrade:  โฌ‡๏ธ Downgrades dependencies',
            },
            {
                value: 'merge',
                name: 'merge:      ๐Ÿ”€ Merge branches',
            },
            {
                value: 'quick',
                name: 'quick:      ๐Ÿš‘ Temporarily resolves a critical bug',
            },
            {
                value: 'revert',
                name: 'revert:     ๐Ÿฆ” Rolls back to a previous version',
            },
            {
                value: 'style',
                name: 'style:      ๐ŸŽจ Fixes styles',
            },
            {
                value: 'test',
                name: 'test:       โœ”๏ธ Fixes tests',
            },
            {
                value: 'typo',
                name: 'typo:       โœ๏ธ Fixes typos',
            },
            {
                value: 'upgrade',
                name: 'upgrade:    โฌ†๏ธ Upgrades dependencies',
            },
            {
                value: 'warn',
                name: 'warn:       ๐Ÿšจ Fixes compiler and/or ๐Ÿ‘• linter warnings',
            },
        ],
        refactor: [
            {
                value: 'abstract',
                name:
                    'abstract:   ใ€ฐ๏ธ Changes that simplify code through abstraction',
            },
            {
                value: 'move',
                name: 'move:       ๐Ÿšš Moves files',
            },
            {
                value: 'prune',
                name: 'prune:      ๐Ÿ”ฅ Removes code and/or files',
            },
            {
                value: 'read',
                name: 'read:       ๐Ÿ’ก Changes that improve code readability',
            },
            {
                value: 'rename',
                name: 'rename:     ๐Ÿท๏ธ Renames files',
            },
            {
                value: 'reuse',
                name:
                    'reuse:      โžฐ Changes that implement or improve code reuse',
            },
        ],
        setup: [
            {
                value: 'config',
                name: 'config: ๐Ÿ› ๏ธ Adds or updates configuration files',
            },
            {
                value: 'init',
                name: 'init:   ๐Ÿ’ƒ Initial commit',
            },
            {
                value: 'move',
                name: 'move:   ๐Ÿšš Moves files',
            },
            {
                value: 'prune',
                name: 'prune:  ๐Ÿ”ฅ Removes code and/or files',
            },
            {
                value: 'rename',
                name: 'rename: ๐Ÿท๏ธ Renames files',
            },
        ],
        test: [
            {
                value: 'e2e',
                name: 'e2e:    ๐ŸŽข Adds or updates end-to-end tests',
            },
            {
                value: 'perf',
                name: 'perf:   โšก๏ธ Adds or updates performance tests',
            },
            {
                value: 'unit',
                name: 'unit:   ๐Ÿšฆ Adds or updates unit tests',
            },
        ],
        ux: [
            {
                value: 'access',
                name: 'access:     โ™ฟ๏ธ Changes that improve user accessibility',
            },
            {
                value: 'alt-text',
                name: 'alt-text:   ๐Ÿ’ฌ Adds or updates alternative text',
            },
            {
                value: 'android',
                name: 'android:    ๐Ÿค– Android-specific changes',
            },
            {
                value: 'animation',
                name:
                    'animation:  โœจ Adds or updates animations and transitions',
            },
            {
                value: 'ios',
                name: 'ios:        ๐Ÿ“ฑ iOS-specific changes',
            },
            {
                value: 'linux',
                name: 'linux:      ๐Ÿง Linux-specific changes',
            },
            {
                value: 'osx',
                name: 'osx:        ๐ŸŽ OSX-specific changes',
            },
            {
                value: 'responsive',
                name:
                    'responsive: ๐Ÿ“ฒ Changes that affect overall responsive design',
            },
            {
                value: 'style',
                name: 'style:      ๐ŸŽจ Adds or updates styles',
            },
            {
                value: 'ui',
                name: 'ui:         ๐Ÿ–ฅ๏ธ General UI-related changes',
            },
            {
                value: 'windows',
                name: 'windows:    ๐Ÿ Windows-specific changes',
            },
        ],
    },
    messages: {
        type: "Select the type of change that you're committing:",
        scope: 'Denote the scope of this change (optional):',
        customScope: 'Denote the scope of this change:',
        subject: 'Write a short description describing this change:\n',
        confirmCommit:
            'Are you sure you want to proceed with the commit above?',
    },
    allowCustomScopes: true,
    skipQuestions: ['body', 'breaking', 'footer'],
    subjectLimit: 100,
};
  1. Here are some of the spacing issues I see in my git commit prompts in VS Code node terminal:

    • The text that comes after the โš™๏ธ :gear:, โ™ป๏ธ :recycle:, and โšก๏ธ :zap: emojis are not aligned with the text after all of the other emojis, even though there is only 1 space after each in my .cz-config.js file. The โšก๏ธ emoji strangely shows what looks to be more than a single space after it. Screen Shot 2021-03-13 at 11 04 32 PM

    • The ๐Ÿ› ๏ธ :hammer_and_wrench: and โฌ‡๏ธ :arrow_down: emojis, although displaying correctly, do not show a space after. Screen Shot 2021-03-13 at 11 06 06 PM

    • The โฌ†๏ธ :arrow_up: emoji should have a space after it Screen Shot 2021-03-13 at 11 06 52 PM

    • The ๐Ÿ–ฅ๏ธ :desktop_computer: emoji should have a space after it Screen Shot 2021-03-13 at 11 09 12 PM

    • The ๐Ÿท๏ธ :label: emoji should have a space after it Screen Shot 2021-03-13 at 11 08 00 PM

  2. Here is the results when I attempt to use my new git commit prompts in a non-VS Code terminal (I am using my macOS terminal version 2.10)

    • All of the emojis are being displayed correctly in this terminal (color, size), but there are still some spacing issues. Spacing issues occur with all emojis except โšก, which appears fine.
<div> Screen Shot 2021-03-13 at 11 21 42 PM </div> <div> Screen Shot 2021-03-13 at 11 22 11 PM </div> <div> Screen Shot 2021-03-13 at 11 22 46 PM </div> <div> Screen Shot 2021-03-13 at 11 23 21 PM </div> <div> Screen Shot 2021-03-13 at 11 24 06 PM </div>

My project info:

  • My project is a starter template to use for my GitHub projects
  • Gatsby, TypeScript, React, ESLint, Stylelint, Prettier, Sass, Husky
    • See package.json for details
My package.json
{
    "name": "ultimate-gatsby-starter",
    "version": "1.0.0",
    "private": true,
    "description": "ultimate-gatsby-starter",
    "keywords": [
        "gatsby",
        "starter",
        "typescript",
        "sass",
        "linting",
        "eslint",
        "prettier",
        "react",
        "yarn"
    ],
    "license": "MIT",
    "author": {
        "name": "name",
        "email": "email@email.com",
        "url": "https://google.com"
    },
    "scripts": {
        "develop": "gatsby develop",
        "start": "gatsby develop --open",
        "build": "yarn install && gatsby build",
        "serve": "gatsby serve",
        "clean": "yarn cache clean",
        "lint:format": "prettier --ignore-path .gitignore \"src/**/*.+(ts|js|tsx)\" --write",
        "lint:fix": "eslint --ignore-path .gitignore \"src/**/*.+(ts|js|tsx)\" && yarn stylelint \"**/*.scss\" --syntax sass --fix",
        "type-check": "tsc",
        "cm": "cz",
        "install:upgrade": "rm -rf node_modules && yarn upgrade && yarn install",
        "install:audit": "yarn audit && yarn install --audit",
        "install:check": "yarn install --check-files && yarn audit",
        "install:clean": "yarn clean && rm -rf node_modules && yarn install"
    },
    "config": {
        "commitizen": {
            "path": "./node_modules/cz-customizable"
        }
    },
    "dependencies": {
        "@types/node": "^14.14.32",
        "@types/react": "^17.0.3",
        "@types/react-dom": "^17.0.1",
        "gatsby": "^3.0.3",
        "gatsby-cli": "^3.0.0",
        "gatsby-link": "^3.0.1",
        "gatsby-plugin-sass": "^4.0.2",
        "gatsby-plugin-typescript": "^3.0.0",
        "react": "^17.0.1",
        "react-dom": "^17.0.1",
        "sass": "^1.32.8",
        "typescript": "^4.2.3"
    },
    "devDependencies": {
        "@danbruegge/gatsby-plugin-stylelint": "^4.1.0",
        "@types/stylelint": "^9.10.1",
        "@typescript-eslint/eslint-plugin": "^4.16.1",
        "@typescript-eslint/parser": "^4.16.1",
        "commitizen": "^4.2.3",
        "cz-conventional-changelog": "3.3.0",
        "cz-customizable": "^6.3.0",
        "eslint": "^7.21.0",
        "eslint-config-prettier": "^8.1.0",
        "eslint-config-standard-with-typescript": "^20.0.0",
        "eslint-plugin-import": "^2.22.1",
        "eslint-plugin-node": "^11.1.0",
        "eslint-plugin-prettier": "^3.3.1",
        "eslint-plugin-promise": "^4.3.1",
        "eslint-plugin-react": "^7.22.0",
        "eslint-plugin-react-hooks": "^4.2.0",
        "gatsby-plugin-stylelint": "^3.2.0",
        "husky": "^5.1.3",
        "prettier": "^2.2.1",
        "prettier-eslint": "^12.0.0",
        "prettier-eslint-cli": "^5.0.1",
        "prettier-stylelint": "^0.4.2",
        "stylelint": "^13.12.0",
        "stylelint-config-prettier": "^8.0.2",
        "stylelint-config-sass-guidelines": "^8.0.0",
        "stylelint-config-standard": "^21.0.0",
        "stylelint-order": "^4.1.0",
        "stylelint-prettier": "^1.2.0",
        "stylelint-scss": "^3.19.0",
        "stylelint-webpack-plugin": "^2.1.1"
    }
}
My VS Code settings.json
{
    // Edits to VS Code settings

    // Editor
    "diffEditor.codeLens": true,
    "editor.acceptSuggestionOnCommitCharacter": true,
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true,
        "source.fixAll.stylelint": true
    },
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "[html]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[javascript]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[json]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[typescriptreact]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[typescript]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "editor.find.autoFindInSelection": "multiline",
    "editor.formatOnSave": true,
    "editor.glyphMargin": false,
    "editor.minimap.enabled": false,
    "editor.tabSize": 4,
    "editor.fontFamily": "Menlo, Monaco, 'Courier New', monospace, 'Apple Color Emoji'",
    "editor.inlineHints.fontFamily": "Menlo, Monaco, 'Courier New', monospace, 'Apple Color Emoji'",

    // Files
    "files.trimTrailingWhitespace": true,

    // Search
    "search.collapseResults": "alwaysCollapse",
    "search.exclude": {
        "**/*.lock": true,
        "**/bower_components": true,
        "**/*.code-search": true
    },

    // TypeScript
    "javascript.format.semicolons": "insert",
    "javascript.preferences.quoteStyle": "single",
    "javascript.updateImportsOnFileMove.enabled": "always",
    "javascript.validate.enable": false,
    "typescript.format.semicolons": "insert",
    "typescript.implementationsCodeLens.enabled": true,
    "typescript.preferences.quoteStyle": "single",
    "typescript.referencesCodeLens.enabled": true,
    "typescript.referencesCodeLens.showOnAllFunctions": true,
    "typescript.validate.enable": false,

    // SCSS (Sass)
    "scss.lint.boxModel": "warning",
    "scss.lint.compatibleVendorPrefixes": "warning",
    "scss.lint.duplicateProperties": "error",
    "scss.lint.emptyRules": "ignore",
    "scss.lint.float": "warning",
    "scss.lint.idSelector": "warning",
    "scss.lint.important": "warning",
    "scss.lint.propertyIgnoredDueToDisplay": "error",
    "scss.lint.universalSelector": "warning",
    "scss.lint.zeroUnits": "warning",

    // Git
    "git.allowForcePush": true,
    "git.branchValidationRegex": "/(build|chore|ci|docs|feat|fix|refactor|revert|style|test)/(([a-z|-]{1,20}))/g",
    "git.decorations.enabled": false,
    "git.fetchOnPull": true,
    "git.showPushSuccessNotification": true,

    // Merge Conflict
    "merge-conflict.autoNavigateNextConflict.enabled": true,
    "merge-conflict.decorators.enabled": true,
    "merge-conflict.diffViewPosition": "Beside",

    // Necessary changes to VS Code extension settings
    "npm.packageManager": "yarn",

    // ESLint
    "eslint.alwaysShowStatus": true,
    "eslint.codeActionsOnSave.mode": "all",
    "eslint.debug": false,
    "eslint.format.enable": true,
    "eslint.lintTask.enable": true,
    "eslint.onIgnoredFiles": "off",
    "eslint.packageManager": "yarn",
    "eslint.probe": [
        "javascript",
        "javascriptreact",
        "typescript",
        "typescriptreact",
        "html",
        "vue",
        "markdown"
    ],
    "eslint.run": "onSave",
    "eslint.validate": [
        "javascript",
        "javascriptreact",
        "typescript",
        "typescriptreact",
        "html",
        "vue",
        "markdown"
    ],

    // Prettier
    "prettier.enable": true,
    "prettier.tabWidth": 4,
    "prettier.jsxSingleQuote": true,
    "prettier.singleQuote": true,

    // Stylelint
    "css.validate": false,
    "less.validate": false,
    "scss.validate": false,
    "stylelint.enable": true,
    "stylelint.packageManager": "yarn",
}

Similar Issues / Attempted Solutions:

Does this issue occur when all extensions are disabled?: Yes

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:12
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

12reactions
meredithmurfincommented, Mar 20, 2021

@alexdima Thanks for the suggested workaround. I updated this line in my settings.json so that I no longer include Menlo and instead I have Monaco as the first font listed:

"editor.fontFamily": "Monaco, 'Courier New', monospace, 'Apple Color Emoji'"

My VS Code files now show the Emojis fine. However, Iโ€™m still experiencing Problem 2 (inconsistent spacing in my termina)l:

Screen Shot 2021-03-20 at 4 44 46 PM Screen Shot 2021-03-20 at 4 44 25 PM

Iโ€™m assuming that this is an issue specific to commitizen? This is occurring in both my VS Code terminal and in my Mac OS terminal. Iโ€™ll open an issue there and I will link it here in case anyone else comes across this issue and is looking for a resolution. But definitely let me know if this could somehow be traced back to VS Code.

Additionally, I do agree with @thebinarysearchtree that users expect Emojis to work in VS Code, regardless of the font-family selected (within reason). Users especially expect the default font to display Emojis correctly.

6reactions
DYW972commented, Jan 21, 2022

2022 thanks to @alexdima ! I solved this issue on my macOS by removing Menlo in editor.fontFamily": "Monaco, 'Courier New', monospace",

Now everything works like expected.

๐Ÿ™Œ

Read more comments on GitHub >

github_iconTop Results From Across the Web

emoji not displaying correctly in VS Code Terminal
I'm using some emoji which doesn't display correctly on the terminal when usin git bash in VS Code. A <?> is displaying instead...
Read more >
How to Insert Emoji in Visual Studio Code Editor While Writing ...
How to Insert Emoji in Visual Studio Code Editor While Writing Source Code Using Emoji SnippetsLink of the Extension Used in theย ...
Read more >
April 2022 (version 1.67) - Visual Studio Code
Welcome to the April 2022 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some...
Read more >
Symbols not displayed correctly on macOS : r/emacs - Reddit
As u/alanthird pointed out, Noto Color Emoji currently does not work on macOS, so I switched to Apple Color Emoji for emojis instead....
Read more >
how to use emoji in markdown - Gallarate Sposi
I'm trying to display emoji in VSCode, using this syntax suggested by GitHub: ... many of the country/flag emoji are not displaying correctly...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found