Roboto Font iOS app

5 posts, 1 answers
  1. Dimitar
    Dimitar avatar
    65 posts
    Member since:
    May 2014

    Posted 19 Dec 2017 Link to this post

    Hi,

     I am trying to add Roboto font to my iOS app. 
     As read I have to use the name of the font not the path name. 
     So my font is inserted in app\fonts\Roboto-Regular.ttf 
     As I checked with Font Book the name is "Roboto"
     In my app I have in the app.css file 
     
     Label
     {
      font-family:Roboto ;
     } 

     But it seems not apply to the Label .

     I have tried also this example, which also doesn't work for me . 
    https://github.com/NickIliev/NS-Issues/tree/master/stackoverflow/robotoFont/app

  2. Answer
    nikolay.tsonev
    Admin
    nikolay.tsonev avatar
    329 posts

    Posted 20 Dec 2017 Link to this post

    Hi Dimitar,

    Thank you for contacting us.
    I tested your case with using a custom font in the project while using the latest NativeScript 3.3, however, was unable to recreate an issue while building it for iOS.
    For your convenience, I am attaching sample project and Gif file, which demonstrates that the font is applied properly. In the project, I set up the font family, while using the font name.

    Regarding the attached project in your comment, I notice that the application refers NativeScript 2.5. I would recommend testing the same case with the latest version of NativeScript 



    Regards,
    nikolay.tsonev
    Progress Telerik
    Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
  3. Dimitar
    Dimitar avatar
    65 posts
    Member since:
    May 2014

    Posted 20 Dec 2017 in reply to nikolay.tsonev Link to this post

    Hi , 

    Thanks Nikolay. Its working now.

    How I could implement Robot-Regular , Bold, etc. for iOS . I have tried with font-weight and font style but didn't succeed . 

     

  4. nikolay.tsonev
    Admin
    nikolay.tsonev avatar
    329 posts

    Posted 20 Dec 2017 Link to this post

    Hello Dimitar,

    You should add in the font folder the ttf files, which corresponds to the Bold font weight in the fonts folder. For example in your case, you should also copy Roboto-Bold file inside the folder.
    Then you should be able to setup the font-weight property in the CSS file. I am attaching sample project and Screenshot from the simulator.

    Regards,
    nikolay.tsonev
    Progress Telerik
    Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
  5. Dimitar
    Dimitar avatar
    65 posts
    Member since:
    May 2014

    Posted 20 Dec 2017 Link to this post

    Hi, thank you . It's work now 
Back to Top