potato
potato

Reputation: 4589

changing only height of font

Is it possible to change only the height of a font? I imported a custom font of .ttf data type. So far I am using this code:

 let font = UIFont(name: "importedFont", size: 25.0)
 label.font = font

EDIT! some clarifications: I don't want to change the width of the text because I am running low on space in x direction.

Upvotes: 2

Views: 159

Answers (1)

Danny Bravo
Danny Bravo

Reputation: 4658

You can alter the layer for the label using affine transforms so that it only scales the text in one direction.

label.transform = CGAffineTransformMakeScale(1.0, 4.0) //(x-scale, y-scale)

Your question is very unclear so I'm not sure if this will answer it for you.

Upvotes: 2

Related Questions