Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a medium weight font between -systemFontOfSize: and -boldSystemFontOfSize:?

-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?

like image 988
Proud Member Avatar asked May 01 '12 15:05

Proud Member


People also ask

How do I change the default font 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.

What is font weight and font size?

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 are font weight values?

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.


1 Answers

Starting with iOS 8.2 you can use:

[UIFont systemFontOfSize:14 weight:UIFontWeightMedium]; 
like image 97
Andrei Avatar answered Oct 27 '22 02:10

Andrei