title: I'm getting a NoSuchMethodError when setting a font on a TextView programically with the new font feature
body: <p>From this official example <a href="https://developer.android.com/preview/features/working-with-fonts.html" rel="nofollow noreferrer">https://developer.android.com/preview/features/working-with-fonts.html</a> I'm trying to set a custom font for a <code>TextView</code> which works when set in XML/layout but not when setting it programmatically I get the following error: </p>
  
  <blockquote>
    <p>java.lang.NoSuchMethodError: No virtual method
    getFont(I)Landroid/graphics/Typeface; in class
    Landroid/content/res/Resources; or its super classes (declaration of
    'android.content.res.Resources' appears in
    /system/framework/framework.jar)</p>
  </blockquote>
  
  <p><strong>This is how I'm doing it by code:</strong></p>
  
  <pre><code>    Typeface typeface = getResources().getFont(R.font.morganbold);
      providerTxv.setTypeface(typeface);
  </code></pre>
  
  <p>Is this a bug or I'm I doing something wrong?</p>
  
  <p>I'm using <code>Android Studio Canary 9</code> with Gradle version: <code>gradle:3.0.0-alpha9</code>
  with these support depedencies:</p>
  
  <pre><code>'com.android.support:design:26.0.0'
  'com.android.support:appcompat-v7:26.0.0'
  </code></pre>