0

I am trying to add 3 different custom font to 3 different target how can i add that font. one storyboard have 3 labels which has bold, semi-bold, regular font weight with different size. i have added ttf font file in each target info.plist but how can i set font to each lable ???

6
  • You have to do this manually, something like creating a protocol named Themeable (which has a set font function). Then conform for each view controller | view had labels. Commented Jul 8, 2022 at 6:35
  • you mean if target == "this" { lable.font = .arialBoldFont(size: 17) } like this ?? @son Commented Jul 8, 2022 at 6:45
  • Sorry I misunderstood, you mean 'different target' is different environments like dev, prod, stagging don't you? Commented Jul 8, 2022 at 6:53
  • no different target for different app fevers @son Commented Jul 8, 2022 at 6:57
  • If I read the question correctly it's not about flavors, targets at all? Because you've already added fonts for each target, the question is how to apply correct font to labels in storyboard, right? Commented Jul 9, 2022 at 13:59

1 Answer 1

0

1.check the font file is added to the projectworkspace 2.click the attributes inspector and you will find text click dropdown and choose attributed and you've to choose the font you added in your project and Finally again change text to plain

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.