4

I pick Helvetica Neue UltraLight in IB, and it really looks pretty terrible. Is there a best setting for built in iOS fonts or are all the beautiful fonts all custom imports?

Best background color, font, shadow offset, size? That works for you, i.e, your favorite settings or fonts.

enter image description here

Simple label. iPad screen shot, non-retina.

Vlad Z.
  • 3,401
  • 3
  • 32
  • 60
Edward Potter
  • 3,760
  • 4
  • 28
  • 39
  • Does the font look pixelated in IB or in the simulator? I don't think it's an issue with font. Something else is wrong.... – coder Feb 26 '14 at 21:39
  • On the iPad. It's ok, but still some pixelation. Not sure what else can be going on. Will get an image up. – Edward Potter Feb 26 '14 at 21:40
  • are you changing frame of your label with code? – Vlad Z. Feb 26 '14 at 21:49
  • All done in storyboards. No code. Dropping label on a view with a light gray background and setting alpha 7.5 for just the view so background just shows through. – Edward Potter Feb 26 '14 at 21:52
  • 1
    Helvetica Neue UltraLight has always looked pretty terrible at small sizes IMO. It's a font made for headlines. Also keep in mind iOS does not have subpixel antialiasing, so text is bound to not be great on non-retina displays (especially very thin fonts). – Taum Feb 26 '14 at 21:55
  • 4
    iOS does have sub-pixel anti-aliasign - the issue comes from using attempting to alpha-blend a layer with text in it as the text is pre-rendered in a CoreAnimation layer without knowledge of the potentially transparent items behind and in front in the layer stack. – marko Feb 26 '14 at 22:15
  • Not sure why, weird, the accept an answer arrow is gone. I'm sure it's totally obvious, but trying accept your answer and no arrow to click. – Edward Potter Feb 27 '14 at 23:20

1 Answers1

23

I had the same issue and i took me a couple of hours to find out. So the main issue is that the label or the label parent frame/center is using floating numbers. you can try this and this

My problem was that i have added shadow to parent layer and i had this line self.tabsView.layer.shouldRasterize = YES;
but after removing it the pixeled/blured effect was gone.

Hope it will help.

Community
  • 1
  • 1
Constantin Saulenco
  • 2,353
  • 1
  • 22
  • 44
  • Thanks, I'm all Swift now. This is a great tip. All issues solved. :-) – Edward Potter Apr 24 '15 at 11:52
  • Yes! Thanks infinite for this answer! I've been racking my brain on what is automagically controlling the label/font of a button I'm using, and some existing developers apparently have set the entire parent view to "shouldRasterize"! I had zero clue as to what was going on ... googling "swift3 blurry pixelated font" brought me here ... thanks again! – Chris Allinson Jan 24 '17 at 21:30
  • 1
    @ChrisAllinson glad that it helped :) – Constantin Saulenco Jan 27 '17 at 17:14