Skip to content

Ship Glyphicons fonts referenced by netgen-layouts.css - #10

Open
tacman wants to merge 1 commit into
netgen-layouts:masterfrom
tacman:fix/glyphicons-fonts
Open

tacman wants to merge 1 commit into
netgen-layouts:masterfrom
tacman:fix/glyphicons-fonts

Conversation

@tacman

@tacman tacman commented Jun 6, 2026

Copy link
Copy Markdown

Fixes #9.

app/styles/_vendor.scss imports the full bootstrap-sass stylesheet:

@import "../../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap";

bootstrap-sass's _glyphicons.scss emits a @font-face (default $icon-font-path: "bootstrap/") that resolves, from public/css/, to ../fonts/bootstrap/glyphicons-halflings-regular.{eot,woff2,woff,ttf,svg}. Those font files were never produced: the copy:dist task only copies app/fonts/**, and app/fonts/ has no bootstrap/ subdir. Result: the references 404 at runtime (glyphicon icons render as empty boxes) and Symfony AssetMapper warns about each missing file during asset-map:compile.

The glyphicons are genuinely in use — .glyphicon-* classes appear in app/templates/slider.hbs and app/templates/block_actions.hbs — so removing them isn't the right fix; the fonts just need to ship.

Changes

  • Gruntfile.js: add a copy:vendor rule copying node_modules/bootstrap-sass/assets/fonts/bootstrap → <dist>/fonts/bootstrap, mirroring the existing ace-editor/ckeditor/media rules.
  • bundle/Resources/public/fonts/bootstrap/: include the built glyphicons font files (straight from bootstrap-sass@3.4.1, the version already pinned in package.json) so the fix is effective on pull without requiring a rebuild.

Verification

The committed woff2 matches the upstream bootstrap-sass asset (md5 448c34a56d699c29117adc64c43affeb), and the filenames match the @font-face src URLs in netgen-layouts.css.

_vendor.scss imports the full bootstrap-sass stylesheet, which emits a
@font-face for Glyphicons Halflings pointing at
../fonts/bootstrap/glyphicons-halflings-regular.*. Those font files were
never copied into the dist, so the references 404 (and Symfony
AssetMapper warns about every missing file). The glyphicons are in use:
.glyphicon-* classes appear in slider.hbs and block_actions.hbs.

Add a Grunt copy:vendor rule that copies the bootstrap-sass glyphicons
fonts into <dist>/fonts/bootstrap, and include the built font files so
the fix takes effect without a rebuild.

Fixes netgen-layouts#9

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@emodric

emodric commented Jul 2, 2026

Copy link
Copy Markdown
Member

Hi!

If you can, can you give me some examples of pages where this issue produces 404s?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

netgen-layouts.css references missing Glyphicons fonts (fonts/bootstrap/glyphicons-halflings-regular.*)

2 participants