-systemFontOfSize is too thin, and boldSystemFontOfSize too thick. I need something inbetween.
When I create a UIFont like this:
[UIFont boldSystemFontOfSize:14];
then the debugger prints this font info:
font-family: ".Helvetica NeueUI"; font-weight: bold; font-style: normal; font-size: 14px
Sometimes fonts have a medium font weight. How can I create a font of this type but with a medium weight?
Syntax: font-weight: normal|bold|lighter|bolder|number|initial|inherit|unset; Property Values: normal: This is the default font-weight & defines the normal font-weight.
The font-weight property sets how thick or thin characters in text should be displayed. syntax: font-weight: normal|bold|bolder|lighter|number|initial|inherit; The font-size property sets the size of the text. Being able to manage the text size is important in web design.
What is Font Weight? Font weight is the “value” placed on your font that will determine how bold or light your text will appear. There are many “values” that you can use that provide a great deal of flexibility towards creating the font weight that works best for how you want to display your text.
Starting with iOS 8.2 you can use:
[UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With