Commit 4b3e0c1
docs: document precise root cause of AFontMatcher_match crash
AFontMatcher_match → minikin::SystemFonts::findFontCollection() →
null mDefaultFallback → SIGSEGV in FontCollection::getFamilyForChar.
The minikin singleton is populated by Java's Typeface static init:
Typeface.<clinit> → loadPreinstalledSystemFontMap()
→ setSystemFontMap() → nativeAddFontCollections() [JNI]
→ minikin::SystemFonts::registerFallback()
Without Java/ART, registerFallback is never called, so the singleton
is empty. ASystemFontIterator works because it reads fonts.xml from
the filesystem directly, bypassing minikin.
Our fix (Go-side matching via ASystemFontIterator) is correct — there
is no NDK API to populate minikin's singleton without Java.1 parent 0c27ef9 commit 4b3e0c1
1 file changed
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
17 | 26 | | |
18 | 27 | | |
19 | 28 | | |
| |||
0 commit comments