Use the system fallback to find a typeface for the given character. Note that bcp47 is a combination of ISO 639, 15924, and 3166-1 codes, so it is fine to just pass a ISO 639 here. Will return null if no family can be found for the character in the system fallback. Passing `null` as the parameter
(@Nullable String familyName, @NotNull FontStyle style, @Nullable String[] bcp47, int character)
| 106 | * requested character will be matched. |
| 107 | */ |
| 108 | public Typeface matchFamilyStyleCharacter(@Nullable String familyName, @NotNull FontStyle style, @Nullable String[] bcp47, int character) { |
| 109 | try { |
| 110 | Stats.onNativeCall(); |
| 111 | long ptr = _nMatchFamilyStyleCharacter(_ptr, familyName, style._value, bcp47, character); |
| 112 | return ptr == 0 ? null : new Typeface(ptr); |
| 113 | } finally { |
| 114 | ReferenceUtil.reachabilityFence(this); |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | @Nullable |
| 119 | public Typeface matchFamiliesStyleCharacter(@NotNull String[] families, @NotNull FontStyle style, @Nullable String[] bcp47, int character) { |