0

I've added some custom fonts to my iOS app and tried applying them using Freestyle CSS like

label {
   font-family      : "Niconne-Regular";
   color            : #446620;
}

but it did not work (the colour attribute did get applied). I was able to set the new font using UIFont fontWithName, so it's only Freestyle which could not use the new font (also, the same CSS worked with a built-in font, like "Courier").

Janos
  • 1,987
  • 3
  • 17
  • 24
  • This may be related: https://github.com/Pixate/pixate-freestyle-ios/issues/8. It is possible that the font family is only "Niconne" and font-weight needs to be specified as "Regular". Will check my theory and update. – Janos Jul 07 '14 at 09:08

2 Answers2

1

Your suspicion is exactly right. You have to use the root font name in your Pixate CSS, then use the font-weight property to specify a font variant.

This article by Pixate walks you through how to do that: https://github.com/Pixate/pixate-freestyle-ios/wiki/Embedding-and-Selecting-Fonts

Let me know if you have any additional trouble getting it to work.

Clifton Labrum
  • 13,053
  • 9
  • 65
  • 128
0

Yes, I've just tried

label {
   font-family      : "Niconne";
   color            : #446620;
}

And it worked fine. For more info look here: https://github.com/Pixate/pixate-freestyle-ios/issues/8. It's quite easy to get confused by this behaviour, but the good thing is that it's working!

Janos
  • 1,987
  • 3
  • 17
  • 24