-
-
Notifications
You must be signed in to change notification settings - Fork 815
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
When use grid with font awesome package, the output is weird #2578
Comments
In the current package, |
I encountered this issue as well while using Font Awesome "manually" (without the package). Here is a link to some simpler (?) experiments using boxes on the web app. It seems that a ligature can fail to be applied if the first line of the version before the ligature is applied overflows its container? The behavior seems quite arcane. There is a simple workaround: place the icon in a box with an explicit, oversized width. |
That's pretty clearly because "chess" doesn't have any place where it could be broken across lines. the word "chess" overflows the box but stays on the same line, and then ligatures are applied, coincidentally making it fit the box after all. |
Right you are! Then I guess the specific trigger for the bug is: have text that would otherwise be a ligature be broken over multiple lines, where the first one still doesn't fit the container. |
I was about to edit my comment because I don't agree with myself any more... it seems to be that way, but that is arcane: my hypothesis would explain (to me) why the "chess" ligature always works, but not why that specific width leads to "chess-queen" or even "network-wired" to work... I would assume that rendering the ligatures leads to multiple layout passes; it would be interesting to see what happens on these individual layout passes. |
Description
fa-icon("\u{f445}")
andfa-chess-queen()
works fine, but notfa-icon("chess-queen")
,while
fa-icon("chess-queen")
works fine out of grid layout.Sample code
The output of above code is like:
I now use
fa-icon("\u{f445}")
for a workaround.This issue seems to be similar with duskmoon314/typst-fontawesome#2
Reproduction URL
https://typst.app/project/r4eYUzsDig3IrjArCX_02R
Operating system
Web app, macOS
Typst version
The text was updated successfully, but these errors were encountered: