code: public void applyTypeface(View view, AttributeSet attrs) {
          if (!(view instanceof TextView) || view.getContext() == null) {
              return;
          }
          TextView textView = (TextView) view;
          Resources.Theme theme = view.getContext().getTheme();
  
          List<Integer> defStyleAttrs = getHierarchyDefStyleAttrs(textView.getClass());
          for (Integer defStyleAttr : defStyleAttrs) {
              boolean applied = applyTypeface(textView, defStyleAttr, attrs, theme);
              if (applied) {
                  break;
              }
          }
      }
docs: Apply a custom {@literal Typeface} if it has a {@code customTypeface} attribute.
  This method will search for a {@code customTypeface} attribute looking in the following
  places:
  
  <ul>
  <li>Attributes of the tag defined in the layout</li>
  <li>Attributes of the style applied to the tag</li>
  <li>Attributes of the default style defined in the theme</li>
  <li>Attributes of textAppearance found in any of previous places</li>
  </ul>
  
  <p>
  If after search in the previous places it has not found a {@code customTypeface}, will
  over iterate all the parent classes searching in the default styles until a
  {@code customTypeface} is found.
  </p>
  
  <p>
  This method will also look for the {@code customTypefaceIgnoreParents} attribute
  in the same places as the {@code customTypeface} attribute. If this boolean attribute is
  found and it's set to true, it will ignore any {@code customTypeface} defined in the parent
  classes.
  </p>
  
  @param view  the {@code View} to apply the typefaces
  @param attrs attributes object extracted in the layout inflation