adding a new font in adapter class using " getContext().getAssets() ", crashes my application : public class CustomAdapter extends ArrayAdapter<String> {

    int images[];

    public CustomAdapter(@NonNull Context context, String[] names, int pics[]) {
        super(context, R.layout.face_list, names);
        this.images = pics;
    }

    @NonNull
    @Override
    public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {

        LayoutInflater myInflater = LayoutInflater.from(getContext());
        View listDisplay = myInflater.inflate(R.layout.face_list, parent, false);

        ImageView face = listDisplay.findViewById(R.id.face);
        TextView name = listDisplay.findViewById(R.id.name);


Typeface chawpFont = Typeface.createFromAsset(listDisplay.getContext().getAssets(),"chawp.tff");
        name.setTypeface(chawpFont);

        String participant_name = (String) getItem(position);
        int participant_pic = images[position];



        face.setImageResource(participant_pic);
        name.setText(participant_name);

        return listDisplay;
    }
}
