タイポグラフィとシェイプトークン
フォントと角のスタイルを一元管理します。
「タイポグラフィとシェイプトークン」はCoddyKit上の無料Jetpack Compose Academyレッスンです。 これはレッスン2/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはJetpack Compose Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Jetpack Compose Academyコースには全4レッスンが含まれています。
このレッスンの一部はまだ翻訳されておらず、英語で表示されています。
Fonts Get a Theme Too
Just like colors, your text styles live in the theme. The typography slot of MaterialTheme defines every font size, weight, and spacing in one place. 🔤
A Type Scale
Material gives you a ready-made type scale: named roles like headline, title, body, and label that keep your text consistent across screens.
Named Text Styles
You reach a style by name, so a headlineLarge looks the same everywhere and updates app-wide when you tweak the theme once.
Text(
"Welcome",
style = MaterialTheme.typography.headlineLarge
)Body vs Title
Use bodyMedium for paragraphs and titleLarge for headers; picking the right role gives clear hierarchy without hand-tuning every size.
Customize a Style
You override a role with a copy, changing only what you need; here titleLarge keeps its size but gets a bolder weight.
val type = Typography(
titleLarge = TextStyle(fontWeight = FontWeight.Bold)
)Plug In a Font Family
Swap the default font by setting a fontFamily on your styles, so your brand typeface flows through every Text in the app.
TextStyle(fontFamily = brandFont)Shapes Are Tokens Too
Corners are themeable as well. The shapes slot defines how rounded your cards, buttons, and sheets look across the app.
Small, Medium, Large
Material 3 groups shapes into small, medium, and large tokens, and components automatically pick the size that fits them.
Define Your Corners
You set corner radii once in a Shapes object, and every component that uses that token instantly adopts the new roundness.
val shapes = Shapes(
medium = RoundedCornerShape(12.dp)
)Read a Shape Token
Apply a token directly to a Composable so it matches the theme; here a Surface clips itself with MaterialTheme.shapes.medium.
Surface(shape = MaterialTheme.shapes.medium) { /* card */ }Consistency by Default
Centralizing type and shape tokens means new screens look on-brand automatically, and a single edit restyles them all. ✨
Quick Check
You want every card to share the same corner radius app-wide. Where do you set it?
Recap: Type & Shape, Centralized
You styled text through the typography scale and rounded corners through shape tokens, so one theme keeps fonts and shapes consistent. 🎉
よくある質問
「タイポグラフィとシェイプトークン」レッスンは無料ですか?
はい。「タイポグラフィとシェイプトークン」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Jetpack Compose Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Jetpack Compose Academyコースには全4レッスンが含まれています。
「タイポグラフィとシェイプトークン」で何を学びますか?
フォントと角のスタイルを一元管理します。 ブラウザで直接実行するハンズオンコードでJetpack Compose Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。
Jetpack Compose Academyを始めるのに経験は必要ですか?
事前経験は必要ありません。CoddyKitのJetpack Compose Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン2/4です。
「タイポグラフィとシェイプトークン」レッスンにはどのくらい時間がかかりますか?
ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。
このJetpack Compose Academyレッスンでコードを書いて実行できますか?
はい。すべてのJetpack Compose Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。
このコースのすべてのレッスン
- MaterialThemeとカラースキーム
- タイポグラフィとシェイプトークン
- ダークモードとDynamic Color
- カスタムデザインシステムを作る