title: How to get path of font file from asset folder and how to use that path to set SKTypeface in xamarin android?
body: <p>I am working in native xamarin andorid. I am facing issue to set custom font. I am using "SkiaSharp" plugin to generate canvas view. That plugin is inside PCL so that can be use in both android and ios.</p>
  
  <p><strong>I have one .ttf file in my "Assets" folder.</strong>  </p>
  
  <p>I generate font path using following code.</p>
  
  <pre><code>string path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
  string FontPath = System.IO.Path.Combine(path, "Myfile.ttf");
  </code></pre>
  
  <p>this Path I send to PCL to set <strong>"SKTypeface"</strong></p>
  
  <pre><code>paint.Typeface = SKTypeface.FromFile(FontPath, 0);
  </code></pre>
  
  <p>if it is <strong>"Typeface"</strong> then I can use following approach</p>
  
  <pre><code>Typeface tf = Typeface.CreateFromAsset(Assets, "Myfile.ttf");
  </code></pre>
  
  <p><strong>I always get null SKTypeface as return value.</strong></p>
  
  <p><strong>I think font path is not found.</strong> </p>
  
  <pre><code>bool flag=File.Exist(FontPath)
  </code></pre>
  
  <p>it always return null value. </p>
  
  <p><strong><em>How to get path of Asset folder in xamarin andorid?
  How to set custom font to SKTypeface?</em></strong></p>