Skip to content

Remove unused web fonts font-awesome/webfonts/*.ttf#5219

Merged
demiankatz merged 1 commit into
vufind-org:devfrom
stweil:font-awesome
Apr 21, 2026
Merged

Remove unused web fonts font-awesome/webfonts/*.ttf#5219
demiankatz merged 1 commit into
vufind-org:devfrom
stweil:font-awesome

Conversation

@stweil
Copy link
Copy Markdown
Contributor

@stweil stweil commented Apr 18, 2026

The TrueType variants are not used. VuFind only uses the Web Open Font variants.

The TrueType variants are not used. VuFind only uses the Web Open Font variants.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
@stweil
Copy link
Copy Markdown
Contributor Author

stweil commented Apr 18, 2026

It looks like fa-v4compatibility.woff2 is also unused.

@demiankatz
Copy link
Copy Markdown
Member

Thanks, @stweil! In the long term, I think the best thing to do would be to add FontAwesome to the list of dependencies installed using NPM, rather than relying on the manually-copied vendor files. I know that @crhallberg has also done some work in #4031 to automate this, but I expect that PR may be delayed until 12.0 due to the limited time remaining to finish up release 11.1. Maybe it would make sense to backport the relevant parts here so we can take advantage of FontAwesome upgrading and automation more easily in the meantime. I'm curious what led you to remove these files as well -- is it just optimization of the overall package size, or some other reason? We may want to discuss the best balance between shaving off files and keeping vendor package installation simple.

@crhallberg, I'm also interested to hear your thoughts about all of this!

@stweil
Copy link
Copy Markdown
Contributor Author

stweil commented Apr 20, 2026

My motivation was reducing the number of files which are managed by Git before updating FontAwesome. And the update of FontAwesome was part of my work on reducing the number of Sass deprecation warnings.

I agree that an installation of FontAwesome via NPM would be the better solution. I had planned to provide the update of FontAwesome using the current directory structure, but can switch to an NPM installation as well.

And of course there are also alternatives to FontAwesome which might be considered ...

@demiankatz
Copy link
Copy Markdown
Member

@stweil, if you want to revise this PR to add the NPM-based FontAwesome installation, it should be possible to keep the current directory structure, but just populate it by copying the appropriate files to the appropriate places using copyDependencies.mjs. I think it would be appropriate for the scope of this PR to include upgrading FontAwesome, automating the installation process, and removing unnecessary files, at least as long as the plan is to keep the same major version of FontAwesome for now. If you're looking at upgrading to the next major version, more work will be needed to remap icons, and I think much of that work is already done in #4031.

The overall purpose of #4031 (aside from upgrading FontAwesome) is to use the "mix-in" mechanism to make it easier to swap in different icon libraries in future, so if you have alternatives in mind, you might want to take a look at that PR and leave suggestions there. (It's a bit out of date, though, since @crhallberg has been on leave and hasn't had a chance to update it in a little while).

@stweil
Copy link
Copy Markdown
Contributor Author

stweil commented Apr 20, 2026

FontAwesome 7 (which fixes the Sass deprecations) uses a different font path: the webfonts are expected in themes/bootstrap5/webfonts. I used a symbolic link to themes/bootstrap5/css/vendor/font-awesome/webfonts to provide the expected path in my test installation. For an NPM installation, it looks a bit weird to copy the fonts to themes/bootstrap5/css/vendor/font-awesome/webfonts and then linking them to the final destination. I suggest either a symbolic link or a copy from the NPM installation to themes/bootstrap5/webfonts, and themes/bootstrap5/css/vendor/font-awesome would be removed.

But I think that this might be better done in dev-12.0. For the dev branch, the current structure should be kept with minimal cleanups like in the PR here.

@stweil
Copy link
Copy Markdown
Contributor Author

stweil commented Apr 21, 2026

The NPM installation of FontAwesome 7 no longer provides TTF font files. And maybe VuFind should use SVG icons instead of web fonts in the future (see https://docs.fontawesome.com/web/dig-deeper/webfont-vs-svg).

@demiankatz
Copy link
Copy Markdown
Member

Thanks for the clarification, @stweil, this is definitely more complicated than I had hoped. Upgrading to FontAwesome 7 is non-trivial and potentially compatibility-breaking, so it would be better to wait until 12.0 for that. But it would be nice to get rid of the security warnings as soon as possible. If we're going to go in the direction of #4031, I'd rather finish that work than do a complex upgrade that needs to be refactored later... but if we need to move away from FontAwesome 6 entirely, than maybe the work of #4031 is overkill. Some decisions need to be made.

@crhallberg, can you share your thoughts on this?

@demiankatz
Copy link
Copy Markdown
Member

(I should also note that this may be a good topic for discussion on the next Community Call!)

@stweil
Copy link
Copy Markdown
Contributor Author

stweil commented Apr 21, 2026

My implementation for Font Awesome Free 7 in one of our test instances is in UB-Mannheim@8d8dae3.

@crhallberg
Copy link
Copy Markdown
Contributor

crhallberg commented Apr 21, 2026

This all seems correct to me. TTF is falling out of use on the web and we don't use any compatibility shims from Font Awesome. These files can be safely removed. 👍

Copy link
Copy Markdown
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @crhallberg, in that case I'll go ahead and remove these files to get this PR wrapped up, and we can continue the conversation about next steps in whatever followup @stweil decides to share (or on #4031, if he thinks it would be more productive to move in that direction).

@demiankatz demiankatz merged commit 19ae4a8 into vufind-org:dev Apr 21, 2026
7 checks passed
@demiankatz demiankatz added this to the 11.1 milestone Apr 21, 2026
@stweil stweil deleted the font-awesome branch April 21, 2026 20:26
@stweil
Copy link
Copy Markdown
Contributor Author

stweil commented Apr 21, 2026

@demiankatz, there are several options. Therefore I think that discussing them on the next Community Call as you have suggested would be good.

@demiankatz
Copy link
Copy Markdown
Member

@demiankatz, there are several options. Therefore I think that discussing them on the next Community Call as you have suggested would be good.

Great, I will make sure it is included on the agenda. See you there!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants