Hmmm... A quick test of this code:
class ScalingViewController: UIViewController {
@IBOutlet weak var theLabel: UILabel!
@IBOutlet weak var theOtherLabel: UILabel!
let now = Date()
let labelA: UILabel = {
let v = UILabel()
v.translatesAutoresizingMaskIntoConstraints = false
v.backgroundColor = UIColor.cyan
return v
}()
let labelB: UILabel = {
let v = UILabel()
v.translatesAutoresizingMaskIntoConstraints = false
v.backgroundColor = UIColor.yellow
return v
}()
let labelC: UILabel = {
let v = UILabel()
v.translatesAutoresizingMaskIntoConstraints = false
v.backgroundColor = UIColor.green
return v
}()
override func viewDidLoad() {
super.viewDidLoad()
view.addSubview(labelA)
view.addSubview(labelB)
view.addSubview(labelC)
labelA.topAnchor.constraint(equalTo: view.topAnchor, constant: 40.0).isActive = true
labelA.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 8.0).isActive = true
labelB.topAnchor.constraint(equalTo: labelA.topAnchor, constant: 0.0).isActive = true
labelB.leadingAnchor.constraint(equalTo: labelA.trailingAnchor, constant: 8.0).isActive = true
labelC.topAnchor.constraint(equalTo: labelA.topAnchor, constant: 0.0).isActive = true
labelC.leadingAnchor.constraint(equalTo: labelB.trailingAnchor, constant: 8.0).isActive = true
var aText = NSMutableAttributedString()
let baseFont = UIFont.systemFont(ofSize: 30.0, weight: UIFontWeightLight)
let testString = "Example"
let tsLength = testString.characters.count
// Font only
aText = NSMutableAttributedString()
aText.append(NSMutableAttributedString(string: testString, attributes: [NSFontAttributeName: baseFont]))
labelA.attributedText = aText
// Font + positive Baseline Offset of 1st character
aText = NSMutableAttributedString()
aText.append(NSMutableAttributedString(string: testString, attributes: [NSFontAttributeName: baseFont]))
aText.addAttribute(NSBaselineOffsetAttributeName, value: 10.0, range: NSRange(location: 0, length: 1))
labelB.attributedText = aText
// Font + negative Baseline Offset of all but 1st character
aText = NSMutableAttributedString()
aText.append(NSMutableAttributedString(string: testString, attributes: [NSFontAttributeName: baseFont]))
aText.addAttribute(NSBaselineOffsetAttributeName, value: -10.0, range: NSRange(location: 1, length: tsLength - 1))
labelC.attributedText = aText
}
}
Gave me this result:

I suppose if I knew enough about all the typography aspects of String attributes this would make sense?