servo / servo/font-kit

Panic on Mac OS trying to read Apple Color Emoji

Open
#236 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
840
Forks
137
Avg merge
4h 56m
Merged PRs (30d)
1

Description

Background - I have just started getting into using silicon and nvim-silicon on an M1 Macbook. In its default configuration, I noted I was getting panics trying to create screenshots using both the command line utility and the nvim plugin:

silicon returned with: thread 'main' panicked at /Users/brew/Library/Caches/Homebrew/cargo_cache/registry/src/index.crates.io-6f17d22bba15001f/font-kit-0.11.0/src/loaders/freetype.rs:1146:9:
assertion `left == right` failed
  left: 23
 right: 0

I noticed that this lined up with this function, which makes special mention of Apple Color Emoji. I tried explicitly removing Apple Color Emoji from the list of fonts, after which it worked fine. Replacing it with Noto Emoji also works (albeit in monochrome).

(I am assuming that this is an issue somewhere in the underlying font support rather than in Silicon, apologies if this is in the wrong place.)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Apple Color Emoji handling referenced in src/loaders/freetype.rs around the reported font-kit 0.11.0 assertion, then reproduce the panic using silicon's default font configuration on M1 macOS. Done means the reported command-line screenshot flow no longer panics when Apple Color Emoji is loaded.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.