mirror of
https://github.com/material-components/material-components-ios.git
synced 2026-02-20 08:27:32 +08:00
This PR replaces API links containing "/api-docs/" with links to suitable header files in GitHub because the site previously linked to is being taken down and replaced with something that won't handle API docs. Closes https://github.com/material-components/material-components-ios/pull/10045 COPYBARA_INTEGRATE_REVIEW=https://github.com/material-components/material-components-ios/pull/10045 from andrewoverton:replace-mio-api-docs-with-github-links 0d6e56cc11d0c147366a4f6cde829d8b51567ecc PiperOrigin-RevId: 323424362
54 lines
1.7 KiB
Markdown
54 lines
1.7 KiB
Markdown
# Typography
|
|
|
|
*Notice*: Much of this component, with exception of the UIFont and UIFontDescriptor APIs, will soon
|
|
be deprecated. Please consider using the [schemes/Typography](../schemes/Typography) component and
|
|
the [Material Theming](../../docs/theming) APIs instead.
|
|
|
|
---
|
|
|
|
<div class="article__asset article__asset--screenshot">
|
|
<img src="docs/assets/typography.png" alt="Typography" width="375">
|
|
</div>
|
|
|
|
The Typography component provides methods for displaying text using the type sizes and opacities
|
|
from the Material Design specifications.
|
|
|
|
## Design & API Documentation
|
|
|
|
<ul class="icon-list">
|
|
<li class="icon-list-item icon-list-item--spec"><a href="https://material.io/go/design-typography">Material Design guidelines: Typography</a></li>
|
|
<li class="icon-list-item icon-list-item--link"><a href="https://github.com/material-components/material-components-ios/blob/develop/components/Typography/src/MDCTypography.h">API: MDCTypography</a></li>
|
|
<li class="icon-list-item icon-list-item--link"><a href="https://github.com/material-components/material-components-ios/blob/develop/components/Typography/src/MDCTypography.h">API: MDCTypographyFontLoading</a></li>
|
|
</ul>
|
|
|
|
## Installation
|
|
|
|
### Installation with CocoaPods
|
|
|
|
To add this component to your Xcode project using CocoaPods, add the following to your `Podfile`:
|
|
|
|
```bash
|
|
pod 'MaterialComponents/Typography'
|
|
```
|
|
<!--{: .code-renderer.code-renderer--install }-->
|
|
|
|
Then, run the following command:
|
|
|
|
```bash
|
|
pod install
|
|
```
|
|
|
|
## Usage
|
|
|
|
- [Typical use](typical-use.md)
|
|
|
|
## Type Sizes and Opacities
|
|
|
|
- [Type sizes and opacities](type-size-opacity.md)
|
|
|
|
## Advanced Usage
|
|
|
|
- [Advanced use](advanced-use.md)
|
|
|
|
- [Dynamic Type](dynamic-type.md)
|