-
Notifications
You must be signed in to change notification settings - Fork 39
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
{fontawesome} doesn't recognize aliases (though they render just fine) #94
Comments
Do we need a lookup for icons renamed in v5? The PR linked to by @ismirsehregal contains pointers:
fontawesome::fa("times")
#> Error: This Font Awesome icon ('times') does not exist
fontawesome::fa("xmark")
#> Warning: fontawesome does not support this output. Icon(s) will not show. Created on 2022-08-25 by the reprex package (v2.0.1) |
@krlmlr this is v4 -> v6: v4 -> v5 (if needed) can be found here: https://fontawesome.com/v5/docs/web/setup/upgrade-from-v4#icon-name-changes-between-version-4-and-5 |
Thanks for posting this issue. I'm addressing this as part of #96. With that, all past known aliases for icons available in the v6.2 set (taken from Font Awesome's metadata) should now work when used as short names (e.g., |
Possibly related to #76?
This seems to be happening (to me, at least) specifically with FA's icon aliases*. Some icons have accumulated lots of aliases over the years, e.g. the x-multiplication symbol: officially "xmark", but acceptable aliases are "close", "multiply", "times", and "remove".
In any case, the newer {fontawesome} package doesn't seem to extract aliases when building
fa_tbl
(nor maintains a separate alias table). Theicons.json
file is parsed, however, and here's an example entry (for "xmark"), note thealiases
property:So I think this can be solved pretty easily, and I'm happy to submit a PR, though I don't know if you'd prefer to have an ancillary table (like
fa_tbl_shims
), or add (partially redundant, apart from the icon name) rows tofa_tbl
itself. Unlike with thefa_tbl_shims
, the aliases represent a one-to-many relationship, so the left-join here doesn't work so well, and instead it might make sense to build a master inverted index (with all names: v6, v4, and aliases) to find thefa_tbl
row (if it exists).(* something something about naming and cache invalidation being the two hardest problems in computing)
The text was updated successfully, but these errors were encountered: