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

Missing Ideographic Variation Sequences #5319

Open
1 task done
SaitoAtsushi opened this issue Oct 29, 2024 · 6 comments
Open
1 task done

Missing Ideographic Variation Sequences #5319

SaitoAtsushi opened this issue Oct 29, 2024 · 6 comments
Labels
bug Something isn't working text Text layout, shaping, internationalization, etc.

Comments

@SaitoAtsushi
Copy link

Description

Last IVS in token is lacked on typst 0.12.0.

#set text(font: "Noto Serif JP", weight: "bold")

近󠄁藤

近󠄁

#box("近󠄁")藤

example

Reproduction URL

No response

Operating system

Windows

Typst version

  • I am using the latest version of Typst
@SaitoAtsushi SaitoAtsushi added the bug Something isn't working label Oct 29, 2024
@laurmaedje
Copy link
Member

I'm not knowledge w.r.t Japanese typography, but I assume IVS means Ideographic Variation Sequence here?

@laurmaedje laurmaedje added the text Text layout, shaping, internationalization, etc. label Oct 31, 2024
@SaitoAtsushi
Copy link
Author

Yes.

I tried official release binaries in order.
Version 0.11.1 works as my expect.
The problem appears from version 0.12.0 Candidate 1.

@laurmaedje laurmaedje changed the title IVS is lacked Missing Ideographic Variation Sequences Nov 1, 2024
@bluebear94
Copy link
Contributor

Looks like line breaking strips out trailing default-ignorable characters, which include the variation selectors, from each line. I think we need to reconsider what characters can be safely stripped from the end of a line.

bluebear94 added a commit to bluebear94/typst that referenced this issue Dec 19, 2024
@bluebear94
Copy link
Contributor

Another option is to perform trimming when collecting the elements; I have a proof of concept on my fork of the repo, but it results in some subtle changes in output right now.

@laurmaedje
Copy link
Member

We should probably investigate what other engines do...

@bluebear94
Copy link
Contributor

I checked what SILE did and I couldn’t find anything related to special handling of default ignorables. I think SILE just uses what ICU4C does.

I think the test failures on my mf/collect-side-trimming branch are from differences in when an empty Text item is emitted. I don’t know how that could affect layout, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working text Text layout, shaping, internationalization, etc.
Projects
None yet
Development

No branches or pull requests

3 participants