0

I want to use use a customer ttf font as the Web View's default font. the html documents i wish to display using UTF8 characters and they needs a special font ttf to display. btw, they are unicode characters on mac, i could change my default font to that xyz.ttf. on iphone safari i could not set default font for fallback. so, i am creating this simple app using UIWebview with custom ttf font. Wondering if this is possible?

Thanks guys

tun
  • 1
  • 2

2 Answers2

0
NSString *myDescriptionHTML = [NSString stringWithFormat:@"<html> \n"
                            "<head> \n"
                            "<style type=\"text/css\"> \n"
                            "body {font-family: \"%@\"; font-size: %@;}\n"
                            "</style> \n"
                            "</head> \n"
                            "<body>%@</body> \n"
                            "</html>", @"helvetica", [NSNumber numberWithInt:kFieldFontSize], content];

Please check above code...

reference : code

Community
  • 1
  • 1
Bhavesh Vadalia
  • 805
  • 6
  • 23
0

you can use @font-face, but you need to convert that font to svg.

puckipedia
  • 811
  • 6
  • 12