title: custom font in Android Studio
body: <p>How to create custom fonts in android studio ?
  Im trying to use a custom font, and I've read that I suppose to place the fonts in assets/fonts.
  I have searched long and hard but found nothing that helped yet.
  Where I wrong? I really do not know what to do.
  I wrote all the details below. I've tried and did not succeed.
  I'm using Android Studio and it doesn't seem like I have a assets folder. So I created one. But my app crashes when I place the assets folder in /main/assets. Im using this code to load my fonts.</p>
  
  <p>I know that . structure for a project in Android Studio 0.5.2:</p>
  
  <pre><code>root-module
  |--.idea
  |--app
  |----build
  |----src
  |------main
  |--------assets
  |----------fonts/SomeFont.ttc
  |----------fonts/AnotherFont.otf
  |--------java
  |----------source code here
  |--------res
  |------AndroidManifest.xml
  |----build.gradle
  </code></pre>
  
  <p><strong><em>Update</em></strong></p>
  
  <p>my fonte file dir : E:\AndroidProjects\ReadNews\ReadNews\src\main\assets\fonts\</p>
  
  <p><strong><em>end Update</em></strong></p>
  
  <p>my code :</p>
  
  <pre><code> @Override
       protected void onPreExecute() {
              TextView titleTextView = (TextView) _dialog.findViewById(R.id.title_news_TextView);
              TextView messageTextView = (TextView) _dialog.findViewById(R.id.message_TextView);
              String fontPath = "fonts/Tahoma.ttf";
              Typeface tf = Typeface.createFromAsset(MainActivity.this.getResources().getAssets(), fontPath);
              titleTextView.setTypeface(tf);
              messageTextView.setTypeface(tf);
          }
  </code></pre>
  
  <p>error :</p>
  
  <blockquote>
    <p>06-27 07:40:37.985    4206-4206/com.mmd2009.readnews E/AndroidRuntime﹕
    FATAL EXCEPTION: main
        Process: com.mmd2009.readnews, PID: 4206
        java.lang.RuntimeException: <strong>native typeface cannot be made</strong>
                at android.graphics.Typeface.(Typeface.java:175)
                at android.graphics.Typeface.createFromAsset(Typeface.java:149)
                at com.mmd2009.readnews.MainActivity$ReadNewsAsyncTask.onPreExecute(MainActivity.java:216)
                at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:587)
                at android.os.AsyncTask.execute(AsyncTask.java:535)
                at com.mmd2009.readnews.MainActivity$1.onClick(MainActivity.java:70)
                at android.view.View.performClick(View.java:4438)
                at android.view.View$PerformClick.run(View.java:18422)
                at android.os.Handler.handleCallback(Handler.java:733)
                at android.os.Handler.dispatchMessage(Handler.java:95)
                at android.os.Looper.loop(Looper.java:136)
                at android.app.ActivityThread.main(ActivityThread.java:5017)
                at java.lang.reflect.Method.invokeNative(Native Method)
                at java.lang.reflect.Method.invoke(Method.java:515)
                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
                at dalvik.system.NativeStart.main(Native Method)</p>
  </blockquote>
  
  <p>my ReadNews-ReadNews.iml :</p>
  
  <pre><code>  &lt;facet type="android" name="Android"&gt;
        &lt;configuration&gt;
          &lt;option name="SELECTED_BUILD_VARIANT" value="debug" /&gt;
          &lt;option name="ASSEMBLE_TASK_NAME" value="assembleDebug" /&gt;
          &lt;option name="COMPILE_JAVA_TASK_NAME" value="compileDebugJava" /&gt;
          &lt;option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugTest" /&gt;
          &lt;option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" /&gt;
          &lt;option name="ALLOW_USER_CONFIGURATION" value="false" /&gt;
          &lt;option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" /&gt;
          &lt;option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" /&gt;
          &lt;option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" /&gt;
          &lt;option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" /&gt;
        &lt;/configuration&gt;
      &lt;/facet&gt;
  </code></pre>