In a UITextView
is it possible to set the fontname.I want to display Telugu font in UITextview
.This is the Telugu font family name "TeluguSangamMN-Bold".I am declaring Telugu font family in UITextview
.But it is not worked for me.help me any body.
This is my code..
-(void)connectionDidFinishLoading:(NSURLConnection *)connection
{
[UIApplication sharedApplication].networkActivityIndicatorVisible=NO;
if(connection==urlConnection)
{
NSString *strResponse=[[NSString alloc]initWithData:responseData encoding:NSUTF8StringEncoding];
NSLog(@"String Response is : %@",strResponse);
NSRange r;
NSString * cleanString = [NSMutableString stringWithString:strResponse];
while ((r = [cleanString rangeOfString:@"<[^>]+>" options:NSRegularExpressionSearch]).location != NSNotFound)
cleanString = [cleanString stringByReplacingCharactersInRange:r withString:@"\n"];
text1.text=cleanString;
}
}
-(void)viewDidLoad
{
text1=[[UITextView alloc]initWithFrame:CGRectMake(10, 300, 300, 80)];
text1.font=[UIFont fontWithName:@"TeluguSangamMN-Bold" size:12];
text1.font=[UIFont boldSystemFontOfSize:12];
text1.backgroundColor=[UIColor whiteColor];
text1.editable=NO;
[self.view addSubview:text1];
}