• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package com.airbnb.lottie;
2 
3 import android.graphics.Typeface;
4 
5 /**
6  * Delegate to handle the loading of fonts that are not packaged in the assets of your app or don't
7  * have the same file name.
8  *
9  * @see LottieDrawable#setFontAssetDelegate(FontAssetDelegate)
10  */
11 @SuppressWarnings({"unused", "WeakerAccess"}) public class FontAssetDelegate {
12 
13   /**
14    * Override this if you want to return a Typeface from a font family.
15    */
fetchFont(String fontFamily)16   public Typeface fetchFont(String fontFamily) {
17     return null;
18   }
19 
20   /**
21    * Override this if you want to return a Typeface from a font family and style.
22    */
fetchFont(String fontFamily, String fontStyle, String fontName)23   public Typeface fetchFont(String fontFamily, String fontStyle, String fontName) {
24     return null;
25   }
26 
27   /**
28    * Override this if you want to specify the asset path for a given font family.
29    */
getFontPath(String fontFamily)30   public String getFontPath(String fontFamily) {
31     return null;
32   }
33 
34   /**
35    * Override this if you want to specify the asset path for a given font family and style.
36    */
getFontPath(String fontFamily, String fontStyle, String fontName)37   public String getFontPath(String fontFamily, String fontStyle, String fontName) {
38     return null;
39   }
40 }
41