Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3fea923b authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Ignore missing target font family during alias registration

Bug: 122665938
Test: TreeHugger
Change-Id: Ic9f72bf5e6891f4d30d54b3f1a3b6a6fc8424788
parent 5af6efd9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1075,6 +1075,11 @@ public class Typeface {
                continue; // If alias and named family are conflict, use named family.
            }
            final Typeface base = systemFontMap.get(alias.getToName());
            if (base == null) {
                // The missing target is a valid thing, some configuration don't have font files,
                // e.g. wear devices. Just skip this alias.
                continue;
            }
            final int weight = alias.getWeight();
            final Typeface newFace = weight == 400 ? base :
                    new Typeface(nativeCreateWeightAlias(base.native_instance, weight));