fix: bundle codicon font in Java Help Center webview#1658
Merged
Conversation
The welcome (Java Help Center) webview used codicon glyphs but never imported the codicon font CSS, relying on VS Code's auto-injected font. That font is not reliably available across platforms, so the icons rendered as empty boxes on Linux. Import @vscode/codicons so the font is inlined into the bundle, matching the other webviews in this repo. Fixes microsoft#1390
There was a problem hiding this comment.
Pull request overview
This pull request fixes missing Codicon glyphs in the Java Help Center (“welcome”) webview—particularly on Linux—by explicitly bundling the Codicon font CSS into the welcome page’s stylesheet instead of relying on VS Code’s implicit webview font injection.
Changes:
- Import
@vscode/codicons/dist/codicon.cssfrom the welcome webview SCSS so the Codicon@font-faceis included in the bundle. - Ensure the Codicon font is inlined via the existing webpack
asset/inlinefont rule, making icon rendering consistent across platforms.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wenytang-ms
approved these changes
Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes #1390
In the Java Help Center (the
welcomewebview), some icons render as empty boxes/blanks on Linux. The affected icons are the codicon glyphs used in the navigation tabs and links:NavigationPanel.tsx—codicon-gear,codicon-globe,codicon-mortar-board,codicon-rocketSocialMediaPanel.tsx—codicon-book,codicon-github-invertedThe image-based icons (logo, tour screenshots, done checkmark) render fine because they are inlined as base64 by webpack.
Root cause
The welcome page stylesheet (
src/welcome/assets/style.scss) only styles.codicon(size/margins) but never imports the codicon font CSS. It silently relied on thecodiconfont that VS Code auto-injects into webviews, which is not reliably present across platforms — so on Linux the glyphs fail to resolve.Every other icon-using webview in this repo imports the font explicitly (e.g.
project-settings,java-runtime,install-jdk,beginner-tips), so the welcome page was the lone exception.Fix
Import
@vscode/codicons/dist/codicon.cssin the welcome stylesheet. The webpack config already inlines.ttffonts asasset/inline, so the font is embedded directly into the bundle and works consistently on Linux, Windows, and macOS — independent of VS Code's injected font. The webview CSP already permitsfont-src ... data:.Verification
webpack --config-name assetsbuilds with no errors.out/assets/welcome/index.jsnow contains an@font-face { font-family: "codicon"; ... format("truetype") }declaration with the font inlined as a base64font/ttfdata URL.