skiptools / skiptools/skip

docs: Document how to manage Material3 typography

Open
#352 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
Dominant language
Swift
Stars
3.2k
Forks
106
Avg merge
6d 13h
Merged PRs (30d)
1

Description

To edit Android fonts, especially navigation titles and tab bar titles, you have to edit your Main.kt and edit typography settings there. This should be in the docs somewhere.

@Composable
internal fun PresentationRootView(context: ComposeContext) {
    val colorScheme = if (isSystemInDarkTheme()) ColorScheme.dark else ColorScheme.light

    val typography = androidx.compose.material3.Typography(
        // nav title (large)
        headlineLarge = androidx.compose.ui.text.TextStyle(
            fontFamily = androidx.compose.ui.text.font.FontFamily.Monospace,
            fontWeight = androidx.compose.ui.text.font.FontWeight.Bold
        ),
        // nav title (smaller)
        headlineMedium = androidx.compose.ui.text.TextStyle(
            fontFamily = androidx.compose.ui.text.font.FontFamily.Monospace,
            fontWeight = androidx.compose.ui.text.font.FontWeight.Bold
        ),
        // tab title
        labelMedium = androidx.compose.ui.text.TextStyle(
            fontFamily = androidx.compose.ui.text.font.FontFamily.Monospace,
            fontWeight = androidx.compose.ui.text.font.FontWeight.Bold
        )
    )

    androidx.compose.material3.MaterialTheme(typography = typography) {
        PresentationRoot(defaultColorScheme = colorScheme, context = context) { ctx ->
            val contentContext = ctx.content()
            Box(modifier = ctx.modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
                RootView().Compose(context = contentContext)
            }
        }
    }
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Main.kt example in the issue and identify the repository's documentation location for Android and Material3 guidance. Document how the Typography settings control navigation and tab titles, including the shown headlineLarge, headlineMedium, and labelMedium examples; done means a newcomer can find and follow these instructions.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
documentation, mobile
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.