Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Android and custom fonts

$
0
0

HI guys,
I want to add in my app a custom font. For iOS is working fine but I'm in trouble with Android. I followed a couple links:

In Android I can't find what the error comes from:

Font asset not found fonts/hwtartz.ttf

I added under Assets a new folder called Fonts. I edited the project file and I removed this folder from AndroidAsset:

   <ItemGroup>
     <AndroidAsset Include="Assets\Fonts">
     <AndroidAsset Include="Assets\Fonts\hwtartz.ttf">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </AndroidAsset>
   </ItemGroup>

Later

   <ItemGroup>
     <AndroidAsset Include="Assets\Fonts\hwtartz.ttf">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </AndroidAsset>
   </ItemGroup>

If I create a CustomRender the error occurs before.

Thank you in advance.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>