Skip to content

Unknown font kind error when using the new emoji.beet with "Noto Color Emoji" font #5134

Closed as not planned

Description

@Andrew15-5

Description

#set text(font: "Noto Color Emoji")
// #emoji.heart.green // Works.
#emoji.beet // Gives the error.
error: failed to process font NotoColorEmoji: unknown font kind

I also find it strange that it doesn't use the system font (I think it isn't built-in) since I didn't disable the fallback parameter. Can't it search for any font that supports a specific glyph and use it (to show as little tofu as possible)?

Reproduction URL

No response

Operating system

Linux

Typst version

  • I am using the latest version of Typst

Activity

  1. added
    bug
    on Oct 5, 2024
  2. PgBiel commented on Oct 5, 2024

    @PgBiel
    Contributor

    This is because #emoji.beet is a Unicode 16.0 (and thus very new) emoji, which likely isn't supported by your copy of Noto Color Emoji.

    However, the error needs to be improved. Saving your code to em.typ, writing typst c em.typ yields:

    error: failed to process font NotoColorEmoji: unknown font kind
    

    (note the lack of any error span or any additional information)

    whereas writing ./typst c em.typ --pdf-standard=a-2b provides a much more helpful error:

    error: the text "\u{1fadc}" could not be displayed with any font
      ┌─ em.typ:3:1
      │
    3 │ #emoji.beet // Gives the error.
      │  ^^^^^^^^^^
    
  3. Andrew15-5 commented on Oct 5, 2024

    @Andrew15-5
    ContributorAuthor

    I also find it strange that it doesn't use the system font (I think it isn't built-in) since I didn't disable the fallback parameter. Can't it search for any font that supports a specific glyph and use it (to show as little tofu as possible)?

    This means that Typst indeed tries to find any font with the glyph, but without a proper error message, I assumed it didn't.

  4. laurmaedje commented on Oct 5, 2024

    @laurmaedje
    Member

    The error means that subsetting failed which ideally shouldn't ever happen. In this case it's because the font is weird I think. There is already an issue about this: #4572

  5. added
    duplicate
    on Oct 5, 2024
  6. Enivex commented on Oct 5, 2024

    @Enivex
    Collaborator

    The error means that subsetting failed which ideally shouldn't ever happen. In this case it's because the font is weird I think. There is already an issue about this: #4572

    Is noto color emoji a bitmap font though?

  7. laurmaedje commented on Oct 5, 2024

    @laurmaedje
    Member

    Depends on the version. New ones are COLRv1 but old ones are CBDT (i.e. color bitmap). In any case, Noto Color Emoji is mentioned in the issue's conversation.

  8. Andrew15-5 commented on Oct 5, 2024

    @Andrew15-5
    ContributorAuthor

    New ones are COLRv1 but old ones are CBDT

    So, which one should I use then?

    Noto-COLRv1-emojicompat.ttf
    Noto-COLRv1-noflags.ttf
    Noto-COLRv1.ttf
    NotoColorEmoji-emojicompat.ttf
    NotoColorEmoji-flagsonly.ttf
    NotoColorEmoji-noflags.ttf
    NotoColorEmoji.ttf
    NotoColorEmoji_WindowsCompatible.ttf
    

    The COLRv1 files are twice as smaller.

  9. Andrew15-5 commented on Oct 5, 2024

    @Andrew15-5
    ContributorAuthor

    The error means that subsetting failed which ideally shouldn't ever happen.

    Do you think that if the subsetting didn't fail, it would've shown the correct error?

  10. laurmaedje commented on Oct 5, 2024

    @laurmaedje
    Member

    If subsetting didn't fail there would be no error, just a tofu. The error is PDF/A specific.

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