I am using a font called: Luckiest Guy in a Swift project (Link to the font). However, in UILabels, it's not vertically aligned to the center even after setting baselineAlignment to the center... Could you check my code and help me out. Thanks a lot!!
I attached a screen shot here to show the problem (https://www.dropbox.com/s/1hxq68dewtzzkxi/IMG_9733.png?dl=0)
var dynamicLabel: UILabel = UILabel()
dynamicLabel.frame = CGRectMake(0, 0, 60, 35) //Frame (the coordinates are changed here to simply the code)
// *** Color and offset *** //
dynamicLabel.backgroundColor = UIColor.blueColor()
dynamicLabel.textColor = UIColor.whiteColor()
dynamicLabel.shadowColor = UIColor.blackColor()
dynamicLabel.shadowOffset = CGSizeMake(0, 1.0)
// *** Text alignment *** //
dynamicLabel.textAlignment = NSTextAlignment.Center
dynamicLabel.font = UIFont(name: "LuckiestGuy-Regular", size: 25)
dynamicLabel.adjustsFontSizeToFitWidth = true
dynamicLabel.minimumScaleFactor = 0.5
dynamicLabel.baselineAdjustment = UIBaselineAdjustment.AlignCenters
// *** Label corner and border *** //
dynamicLabel.layer.masksToBounds = true
dynamicLabel.layer.cornerRadius = 15.0
dynamicLabel.layer.borderColor = UIColor.whiteColor().CGColor
dynamicLabel.layer.borderWidth = 1.0
// Text
dynamicLabel.text = "Excellent!"