Skip to content

Text ill-aligned when emojis are present #4755

Closed as not planned
Closed as not planned

Description

@memeplex

Description

- Without emoji.
- With emoji #emoji.thumb.down
- Without emoji.

In the web app it's subtle:

image

Locally, compiling to pdf (the emoji is not there, I don't know why, but anyway the alignment problem is visible):

image

Locally, previewing with VSCode + tinymist:

image

My environment: typst 0.11.1 and macOS Sonoma 14.4.1

Reproduction URL

No response

Operating system

macOS

Typst version

  • I am using the latest version of Typst

Activity

  1. added
    bug
    on Aug 15, 2024
  2. memeplex commented on Aug 15, 2024

    @memeplex
    Author

    Another local combinations:

    #set text(font: ("Helvetica", "Apple Color Emoji"))
    
    - Without emoji.
    - With emoji #emoji.thumb.down
    - Without emoji.
    image
    #set text(font: ("Helvetica", "Noto Color Emoji"))
    
    - Without emoji.
    - With emoji #emoji.thumb.down
    - Without emoji.
    image

    Neither of them correctly exports the emoji to pdf.

  3. laurmaedje commented on Aug 15, 2024

    @laurmaedje
    Member

    The alignment problem is probably due to similar cause as the motivation here: #4224

    The PDF export doesn't work in 0.11.1, but should work on main.

  4. added
    duplicate
    on Aug 15, 2024
  5. memeplex commented on Aug 15, 2024

    @memeplex
    Author

    I've been reading the linked issues and I agree. Interesting reading, BTW, but what a rabbit hole...

    pdf output of typst 0.11.0 (d84a7e42):

    • With Apple Color Emoji:
    image
    • With Noto Color Emoji:
    image

    So:

    1. Alignment is off as expected per List and enum markers are not aligned with the baseline of the item's contents #1204, but for Noto this is subtler.
    2. pdf output is fixed.
    3. The weird clipping of Noto is fixed (although this may be an artifact of typst.ts, I've no way of knowing)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugduplicate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions