mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-30 20:37:55 +00:00
Fixes #1722 Previously, SharedGrid.getIndex would properly lock any access to search for and load the face metadata for a font face that contains a codepoint. However, that face may be "deferred" (metadata loaded but the actual face not loaded). Later, outside of the SharedGrid write lock, a deferred face may be initialized and cause a data race if two threads are doing this at the same time, sometimes loading to a crash. This commit fixes the issue by always preloading font indexes in getIndex because the usage of getIndex implies a very near term future use of getFace.