10
Views
3
Comments
custom font not appearing in android
Question
Application Type
Mobile

Font appears in iOS but not in Android.

Anyone face similar issue and manage to resolve?

2019-11-11 17-10-24
Manish Jawla
 
MVP

Hi @benjamin kong ,

Can you let us know the approach you followed to implement the custom fonts?

https://www.outsystems.com/forums/discussion/26831/adding-custom-fonts/ 

Can you check the above post, this might help you.

Regards,

Manish Jawla

UserImage.jpg
benjamin kong

im using the method below:

@font-face {    

font-family: 'Cormorant Garamond';    

src: url('{/CityInsightsMobile/CormorantGaramond-Regular.ttf}') format('truetype');   

 font-weight: normal;    

font-style: normal;

}

.Cormorant-Garamond {    

font-family: 'Cormorant Garamond', sans-serif;

}


appears ok on simulator and iOS but not on Android device.

2021-04-09 11-42-43
assif_tiger
 
MVP

Hi benjamin,
I guess the issue is with the font file name; as I see a space between filename.

Please follow below ex:
1- Set your fonr file name in resource as CormorantGaramond-Regular.ttf
2- Make usre it is set to Deploy target directory

3- Make sure the stylesheet is as below:

@font-face {

     font-family: 'CormorantGaramond-Regular';

     src: url('/CityInsightsMobile/CormorantGaramond-Regular.ttf') format('truetype');

     font-weight: normal;

     font-style: normal;

}


4- 

.Cormorant-Garamond {    

font-family: 'CormorantGaramond-Regular ', sans-serif;

}


5- Gegenrate a new build  
6- UnInstall old build on device & Install New one

Good Luck

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.