package com.sipai.jspatrol.utils;

import android.content.Context;
import android.graphics.Typeface;
import android.widget.TextView;

import java.util.List;

/**
 * created by lvliming on 2019/10/17
 */
public class FontUtils {

//    public static final String iphone_black_1 = "iphone_1_simplified";
//    public static final String iphone_black_2 = "iphone_2_simplified";
//    public static final String iphone_black_3 = "iphone_3_simplified";
//    public static final String iphone_black_4 = "iphone_standard_simplified";
//    public static final String iphone_black_5 = "iphone_middle_black";
//    public static final String iphone_black_6 = "iphone_middle_thick";

    public static void setFont(TextView tv, String st, Context context){
            Typeface typeface = Typeface.createFromAsset(context.getAssets(),"fonts/"+st+".ttf");
            tv.setTypeface(typeface);
    }
    public static void setFont(List<TextView> views, String st, Context context){
        for (int i=0;i<views.size();i++){
            Typeface typeface = Typeface.createFromAsset(context.getAssets(),"fonts/"+st+".ttf");
            views.get(i).setTypeface(typeface);
        }
    }
}
