Skip to content

Emoji support not working exactly as intended. #378

@Tagl

Description

@Tagl

@gkreitz
I was trying to set up a statement that has both emojis in text and in the sample input.
With the current set up I got errors for both the standard font and the monospace font.

Missing character: There is no 🧦 (U+1F9E6) in font [lmmono10-regular]:!

I tried messing around a bit with the problemset.cls file and changed the font loading to the following which seems to work to support monospace fonts:

\IfFontExistsTF{NotoColorEmoji}{
    \directlua{luaotfload.add_fallback
    ("emojifallback",
    {
      "NotoColorEmoji:mode=harf;"
    }
    )}
}{}{}
\IfFontExistsTF{NotoColorEmoji}{
    \directlua{luaotfload.add_fallback
    ("mono_fallback",
    {
      "NotoColorEmoji:mode=harf;"
    }
    )}
}{}{}
\setmonofont{CMU TypeWriter Text}[
  NFSSFamily=Mono,
  RawFeature={fallback=mono_fallback}
]

\IfFontExistsTF{CMU Serif}{
    \setmainfont{CMU Serif}
}{}{}

Note, I have approximately 0% idea how this works, I'm just making arbitrary guesses here based on the limited information I find online.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions