Get the App
SLTechnology News&Howtos  ›  Development  › 

How to set WeChat Mini Programs font

Shulou Source: shulou.com Published: 2022-06-01 05:47:50 10月05日 Update

This article is about how to set WeChat Mini Programs fonts to share with you. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

One: font

one。 Font: font. Sets the text properties of the object.

1.font-style: text style.

Values: normal normal font, italic italic font, oblique tilted font.

2.font-weight: sets the weight of the text font. Values range from 100 to 900.

Value: mormal: the normal size is equivalent to 400. Bold: bold, equivalent to 700. Bolder, lighter .

3.font-size: sets the font size.

4.font-variant: sets whether the text in the object is small uppercase.

Value: mormal normal font. Small-caps small uppercase font. After it is set, it will be changed to uppercase regardless of whether the letters are uppercase or not.

5.font-family: sets the font name.

6.font-stretch: sets whether the text in the object is stretched horizontally.

Value: normal: normal text width.

Ultra-condensed: 4 cardinals narrower than normal text width.

Extra-condensed: 3 cardinals narrower than normal text width.

Condensed: 2 cardinals narrower than normal text width.

Semi-condensed: 1 cardinality narrower than normal text width.

Semi-expanded: 1 cardinality wider than normal text width.

Expanded: 2 cardinals wider than normal text width.

Extra-expanded: 3 cardinals wider than normal text width.

Ultra-expanded: 4 cardinals wider than normal text width.

7.font-size-adjust: sets the aspect value of the object to maintain the x-height of the preferred font.

If the Verdana of 14px (aspect value is 0.58) is not available, but the aspect value of an available font is 0.46, the size of the alternative font will be 14 * (0.58 Universe 0.46) = 17.65px.

Thank you for reading! This is the end of the article on "how to set WeChat Mini Programs fonts". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Tags: Font text width cardinality object uppercase size letter text program content uppercase letter size more article good practical name article italic Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS NVidia Redmi Docker Shulou Tech Info