Skip to content
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

Unexpected linebreak in heading/list #2

Open
jlduu opened this issue Aug 3, 2023 · 4 comments
Open

Unexpected linebreak in heading/list #2

jlduu opened this issue Aug 3, 2023 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@jlduu
Copy link

jlduu commented Aug 3, 2023

Please see screenshot
微信截图_20230803132504

@duskmoon314
Copy link
Owner

Weird output to me. I might need to check what happens.

@duskmoon314
Copy link
Owner

This occurs when using the ligatures of Font Awesome in a heading or list item:

// A weird newline occurs
- test #fa-icon("chess-queen") test
- test #text(font: "Font Awesome 6 Free", "chess-queen") test

// No newline occurs
- test #fa-chess-queen() test
- test #text(font: "Font Awesome 6 Free", "\u{f445}") test

I have yet to find out what is different in headings and lists. Currently, I can only suggest using fa-<icon name> instead of fa-icon(<icon name>).

@duskmoon314 duskmoon314 added the help wanted Extra attention is needed label Aug 7, 2023
@duskmoon314 duskmoon314 changed the title Some strange problems Unexpected linebreak in heading/list Aug 7, 2023
@jlduu
Copy link
Author

jlduu commented Aug 7, 2023

This occurs when using the ligatures of Font Awesome in a heading or list item:

// A weird newline occurs
- test #fa-icon("chess-queen") test
- test #text(font: "Font Awesome 6 Free", "chess-queen") test

// No newline occurs
- test #fa-chess-queen() test
- test #text(font: "Font Awesome 6 Free", "\u{f445}") test

I have yet to find out what is different in headings and lists. Currently, I can only suggest using fa-<icon name> instead of fa-icon(<icon name>).

Thanks, it works. The problem might be with typst itself.

@duskmoon314
Copy link
Owner

I recently released v0.2.1. `fa-icon currently looks up icons in a map and uses Unicode to render the icon. So, in most cases, this would not happen.

This might happen if the user uses this package with FontAwesome Pro. There is no map for the Pro set now, and ligatures are used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants