2

i think this is really basic question but i try many way to change the font of UILabel i try this code

lbl = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 300, 100)];
[lbl setText:@"Demo Text"];
[lbl setFont:[UIFont fontWithName:@"Comic-Sans-Ms" size:20]];

but it's not work can you please tell me why i am not getting "Comic Sans Ms" font in my label. with this code other font are working but i don't know what is problem with "Comic-Sans-MS"

Thanks..

AdrienBrault
  • 7,747
  • 4
  • 31
  • 42
Raj
  • 1,213
  • 2
  • 16
  • 34
  • possible duplicate of [What fonts do iPhone applications support?](http://stackoverflow.com/questions/249251/what-fonts-do-iphone-applications-support) – Perception Oct 21 '11 at 11:00
  • 1
    For those looking for a comparable font that is iOS-supported, try `ChalkboardSE-Bold` – Albert Renshaw Jul 11 '17 at 05:41

2 Answers2

0

I take it this is iOS? It would then be because Comic Sans is not installed on iOS.

stuartd
  • 70,509
  • 14
  • 132
  • 163
0

Use custom fonts.

Ilanchezhian
  • 17,426
  • 1
  • 53
  • 55
  • While this may in principle answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to summarize the information you linked to in your post here. – jscs Nov 19 '11 at 03:48