MCPcopy Create free account
hub / github.com/HumbleUI/Skija / findTypefaces

Method findTypefaces

shared/java/paragraph/FontCollection.java:80–94  ·  view source on GitHub ↗
(String[] familyNames, @NotNull FontStyle style)

Source from the content-addressed store, hash-verified

78 }
79
80 @NotNull
81 public Typeface[] findTypefaces(String[] familyNames, @NotNull FontStyle style) {
82 try {
83 assert Arrays.stream(familyNames).allMatch(Objects::nonNull) : "Can't findTypefaces with null familyNames elements";
84 Stats.onNativeCall();
85 long[] ptrs = _nFindTypefaces(_ptr, familyNames, style._value);
86 Typeface[] res = new Typeface[ptrs.length];
87 for (int i = 0; i < ptrs.length; ++i) {
88 res[i] = new Typeface(ptrs[i]);
89 }
90 return res;
91 } finally {
92 ReferenceUtil.reachabilityFence(this);
93 }
94 }
95
96 @Nullable
97 public Typeface defaultFallback(int unicode, FontStyle style, String locale) {

Calls 3

onNativeCallMethod · 0.95
_nFindTypefacesMethod · 0.95
reachabilityFenceMethod · 0.95

Tested by 1

executeMethod · 0.76