title: Make a public type face method in Android
body: <p>I am trying to apply a custom font in different <code>Activities</code>, right now I have the following code in the <code>onCreate()</code> in my <code>MainActivity</code>:</p>
  
  <pre><code>String fontTitle = "fonts/OpenSans-Bold.ttf";
  Typeface titleFont = Typeface.createFromAsset(getAssets(), fontTitle);
  page_title.setTypeface(titleFont);
  </code></pre>
  
  <p>I want to know if it is possible to make the <code>Typeface</code> public so I can access it in other activities. </p>
  
  <p>I created a class called <code>FontHelper</code>:</p>
  
  <pre><code>public class FontHelper extends MainActivity {
  
      // path for the fonts
      String fontTitle = "fonts/OpenSans-Bold.ttf";
  
      Typeface titleFont = Typeface.createFromAsset(getAssets(), fontTitle);
  
  }
  </code></pre>
  
  <p>but in other <code>Activities</code> when I use <code>textView.setTypeface(FontHelper.titleFont)</code> I get an error. How can I fix this error?</p>