I've been attempting to incorporate a custom font into my PhoneGap application, trying out two different methods I came across online. Unfortunately, neither of them seem to be effective when using PhoneGap 3 and Xcode 5.
First method involves using font-face in CSS:
@font-face { font-family: 'Droid Arabic Kufi'; src: url('fonts/DroidKufi-Regular.ttf'); } body { font-family: 'Droid Arabic Kufi'; }
The second method entails editing the Xcode info.plist file:
Initially, I placed DroidKufi-Regular.ttf in the project resources folder.
Then, I added a new row in the info.plist file under
Fonts provided by application
, with the item namedDroidKufi-Regular.ttf
. But unfortunately, this did not work as well.In a desperate attempt, I inserted the following line of code in the viewDidLoad method:
. Yet, this too failed to produce the desired outcome.[UIFont fontWithName:@"Droid Arabic Kufi" size:10.0];