diff --git a/android/README.md b/android/README.md index b0b1472c..d9fa2502 100644 --- a/android/README.md +++ b/android/README.md @@ -30,7 +30,7 @@ The design presets are available name spaced under the `com.gu.Source` object, e ### Typography presets -Typography presets include `fontFamily`, `fontSize`, `lineHeight`, `fontWeight`, `fontStyle` in a single token. [A rough preview of all typography styles is available here.](https://github.com/guardian/source-apps/blob/main/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_snapshot.png) +Typography presets include `fontFamily`, `fontSize`, `lineHeight`, `fontWeight`, `fontStyle` in a single token. [All typography tokens with their previews are listed here](/android/source/src/main/kotlin/com/gu/source/presets/typography/README.md) The library bundles app font files, so they are not separately required in consumer apps. diff --git a/android/gradle/libs.versions.toml b/android/gradle/libs.versions.toml index 9cf562ef..a1779bfc 100644 --- a/android/gradle/libs.versions.toml +++ b/android/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] group = "com.gu.source" -libraryVersion = "0.3.0" +libraryVersion = "0.3.1" compilesdk = "34" minsdk = "26" targetsdk = "34" diff --git a/android/source/src/main/kotlin/com/gu/source/components/pager/PagerProgressBar.kt b/android/source/src/main/kotlin/com/gu/source/components/pager/PagerProgressBar.kt index 974efee2..5a2fb125 100644 --- a/android/source/src/main/kotlin/com/gu/source/components/pager/PagerProgressBar.kt +++ b/android/source/src/main/kotlin/com/gu/source/components/pager/PagerProgressBar.kt @@ -2,6 +2,7 @@ package com.gu.source.components.pager +import android.annotation.SuppressLint import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.background import androidx.compose.foundation.layout.* @@ -62,6 +63,33 @@ private val DefaultButtonColours = ButtonColours( ), ) +private const val DisabledButtonAlpha = 0.2f +private val DefaultDisabledButtonColours = ButtonColours( + border = AppColour( + light = Source.Palette.Neutral7.copy(alpha = DisabledButtonAlpha), + dark = Source.Palette.Neutral100.copy(alpha = DisabledButtonAlpha), + ), + container = AppColour.Transparent, + content = AppColour( + light = Source.Palette.Neutral7.copy(alpha = DisabledButtonAlpha), + dark = Source.Palette.Neutral100.copy(alpha = DisabledButtonAlpha), + ), +) + +// The progress buttons get a min touch size padding of 12.dp, so we need to things by half that to +// get the correct offset and padding +private val ProgressButtonTouchAdjustment = 6.dp + +@Composable +private fun getBarPadding() = if (isTabletDevice()) { + PaddingValues( + top = 8.dp - ProgressButtonTouchAdjustment, + bottom = 12.dp - ProgressButtonTouchAdjustment, + ) +} else { + PaddingValues(top = 8.dp, bottom = 12.dp) +} + /** * A progress bar that shows the current page of a [PagerState] and, on tablets, allows the user to * navigate between pages using next/prev buttons. @@ -69,6 +97,7 @@ private val DefaultButtonColours = ButtonColours( * @param pagerState The [PagerState] that this indicator should be bound to. * @param modifier * @param buttonColours The colours for the next/prev buttons. + * @param disabledButtonColours The colours for the next/prev buttons when they are disabled. * @param selectedIndicatorColour The colour of the selected indicator item. * @param unSelectedIndicatorColour The colour of the unselected indicators items. * @param prevButtonContentDescription The content description for the previous button. @@ -82,6 +111,7 @@ fun PagerProgressBar( pagerState: PagerState, modifier: Modifier = Modifier, buttonColours: ButtonColours = DefaultButtonColours, + disabledButtonColours: ButtonColours? = DefaultDisabledButtonColours, selectedIndicatorColour: AppColour = SelectedIndicatorColour, unSelectedIndicatorColour: AppColour = UnSelectedIndicatorColour, prevButtonContentDescription: String? = null, @@ -92,7 +122,7 @@ fun PagerProgressBar( Box( modifier = modifier - .height(56.dp) + .padding(getBarPadding()) .fillMaxWidth(), ) { PagerProgressIndicator( @@ -108,24 +138,24 @@ fun PagerProgressBar( coroutineScope.launch { val page = when (it) { ProgressDirection.Previous -> { - (pagerState.currentPage - 1) - .let { if (it < 0) pagerState.pageCount - 1 else it } + (pagerState.currentPage - 1).coerceAtLeast(0) } ProgressDirection.Next -> { - (pagerState.currentPage + 1) % pagerState.pageCount + (pagerState.currentPage + 1).coerceAtMost(pagerState.pageCount - 1) } } pagerState.animateScrollToPage(page) } }, - // Offset the row so the buttons visually set at end of the progress bar despite the extra - // touch size padding. + isNextEnabled = pagerState.canScrollForward, + isPrevEnabled = pagerState.canScrollBackward, prevButtonContentDescription = prevButtonContentDescription, nextButtonContentDescription = nextButtonContentDescription, modifier = Modifier - .offset(x = 6.dp) + .offset(x = ProgressButtonTouchAdjustment) .align(Alignment.CenterEnd), + disabledButtonColours = disabledButtonColours, ) } } @@ -170,19 +200,29 @@ fun PagerProgressBar( ) } +@SuppressLint("DiscouragedApi") @Composable private fun ProgressButtons( buttonColours: ButtonColours, onClick: (progressDirection: ProgressDirection) -> Unit, + isNextEnabled: Boolean, + isPrevEnabled: Boolean, prevButtonContentDescription: String?, nextButtonContentDescription: String?, modifier: Modifier = Modifier, + disabledButtonColours: ButtonColours? = null, ) { - Row(modifier = modifier) { + Row( + modifier = modifier, + horizontalArrangement = Arrangement.spacedBy(8.dp), + ) { SourceBaseIconButton( size = SourceButton.Size.Small, buttonColours = buttonColours, + disabledButtonColours = disabledButtonColours, onClick = { onClick(ProgressDirection.Previous) }, + enabled = isPrevEnabled, + modifier = Modifier.offset(x = ProgressButtonTouchAdjustment * 2), ) { Icon( imageVector = Source.Icons.Base.ChevronLeft, @@ -193,7 +233,9 @@ private fun ProgressButtons( SourceBaseIconButton( size = SourceButton.Size.Small, buttonColours = buttonColours, + disabledButtonColours = disabledButtonColours, onClick = { onClick(ProgressDirection.Next) }, + enabled = isNextEnabled, ) { Icon( imageVector = Source.Icons.Base.ChevronRight, @@ -221,7 +263,7 @@ private fun AnimatedPreview() { Column( modifier = Modifier - .padding(8.dp) + .padding(top = 8.dp, start = 8.dp, end = 8.dp) .width(400.dp), ) { HorizontalPager(state = pagerState) { @@ -246,9 +288,7 @@ private fun AnimatedPreview() { } PagerProgressBar( pagerState = pagerState, - modifier = Modifier - .padding(top = 8.dp) - .align(Alignment.CenterHorizontally), + modifier = Modifier.align(Alignment.CenterHorizontally), ) } } @@ -260,17 +300,30 @@ private fun AnimatedPreview() { @Composable internal fun PagerProgressBarPreview() { AppColourMode { - val pagerState = rememberPagerState(1) { 10 } + Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { + Column( + modifier = Modifier + .background( + AppColour(Source.Palette.Neutral100, Source.Palette.Neutral10).current, + ) + .width(600.dp), + ) { + val pagerState = rememberPagerState(2) { 10 } + HorizontalPager(state = pagerState) {} + PagerProgressBar(pagerState = pagerState) + } - Column( - modifier = Modifier - .background( - AppColour(Source.Palette.Neutral100, Source.Palette.Neutral10).current, - ) - .width(600.dp), - ) { - HorizontalPager(state = pagerState) {} - PagerProgressBar(pagerState = pagerState) + Column( + modifier = Modifier + .background( + AppColour(Source.Palette.Neutral100, Source.Palette.Neutral10).current, + ) + .width(600.dp), + ) { + val pagerState = rememberPagerState(0) { 10 } + HorizontalPager(state = pagerState) {} + PagerProgressBar(pagerState = pagerState) + } } } } \ No newline at end of file diff --git a/android/source/src/main/kotlin/com/gu/source/presets/typography/README.md b/android/source/src/main/kotlin/com/gu/source/presets/typography/README.md new file mode 100644 index 00000000..b3bc85bc --- /dev/null +++ b/android/source/src/main/kotlin/com/gu/source/presets/typography/README.md @@ -0,0 +1,19 @@ +# Typography tokens + +List of typography tokens and their previews are below. The tokens are namespaced under `Source.Typography`, e.g. `Source.Typography.TextSans14` + + +| Grey boxes represent the drawn area for the text with vertical clipping enabled | +|---| +|![headlineBold](https://github.com/user-attachments/assets/4922b064-ee81-408d-9b43-3130d95c1fa0)| +|![headlineLight](https://github.com/user-attachments/assets/ee8cf3ba-1d97-435f-b850-a51be89c2fcb)| +|![headlineLightItalic](https://github.com/user-attachments/assets/7f82c14c-949e-44da-a430-f0c6c7cf9150)| +|![headlineMedium](https://github.com/user-attachments/assets/4305a951-25f7-4263-9e47-1bded6eae452)| +|![headlineMediumItalic](https://github.com/user-attachments/assets/b81f7e7f-bbdc-416b-8ba0-139bf48781f9)| +|![headlineSemiBold](https://github.com/user-attachments/assets/e81de258-ffd9-4d2c-be3a-7dd3ad1dad9b)| +|![textArticle](https://github.com/user-attachments/assets/049258f3-236c-4bae-8e4c-6eec57b12901)| +|![textEgyptian](https://github.com/user-attachments/assets/20b8adac-e18f-471c-919e-ebc1447ad252)| +|![textSans](https://github.com/user-attachments/assets/9538255f-2b23-4535-9882-6934a332aa5a)| +|![textSansBold](https://github.com/user-attachments/assets/23c45ba9-1cba-44da-b258-69950281983e)| +|![textSansItalic](https://github.com/user-attachments/assets/c7b3d3e5-bbb6-423b-b52d-cfa8ae0e0e16)| +|![titlepiece](https://github.com/user-attachments/assets/6bc54bbd-968d-4b8e-ad72-d829d2f323bb)| \ No newline at end of file diff --git a/android/source/src/main/kotlin/com/gu/source/presets/typography/Typography.kt b/android/source/src/main/kotlin/com/gu/source/presets/typography/Typography.kt index a02a917c..b1687789 100644 --- a/android/source/src/main/kotlin/com/gu/source/presets/typography/Typography.kt +++ b/android/source/src/main/kotlin/com/gu/source/presets/typography/Typography.kt @@ -6,788 +6,947 @@ import androidx.compose.ui.text.PlatformTextStyle import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.font.FontStyle import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.LineHeightStyle +import androidx.compose.ui.unit.em import androidx.compose.ui.unit.sp -import androidx.compose.ui.unit.times import com.gu.source.R import com.gu.source.Source import com.gu.source.utils.fontFamilyResource +private val BaseTextStyle = TextStyle( + lineHeightStyle = LineHeightStyle( + alignment = LineHeightStyle.Alignment.Proportional, + trim = LineHeightStyle.Trim.Both, + ), + platformStyle = PlatformTextStyle(includeFontPadding = false), +) + +// region HeadlineBold + /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineBold14: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_bold), fontSize = TextSize._14, - lineHeight = LineHeight.Tight * TextSize._14, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineBold15: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_bold), fontSize = TextSize._15, - lineHeight = LineHeight.Tight * TextSize._15, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineBold16: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_bold), fontSize = TextSize._16, - lineHeight = LineHeight.Tight * TextSize._16, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineBold17: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_bold), fontSize = TextSize._17, - lineHeight = LineHeight.Tight * TextSize._17, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineBold18: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_bold), fontSize = TextSize._18, - lineHeight = LineHeight.Tight * TextSize._18, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineBold20: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_bold), fontSize = TextSize._20, - lineHeight = LineHeight.Tight * TextSize._20, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineBold22: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_bold), fontSize = TextSize._22, - lineHeight = LineHeight.Tight * TextSize._22, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineBold24: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_bold), fontSize = TextSize._24, - lineHeight = LineHeight.Tight * TextSize._24, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineBold28: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_bold), fontSize = TextSize._28, - lineHeight = LineHeight.Tight * TextSize._28, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineBold34: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_bold), fontSize = TextSize._34, - lineHeight = LineHeight.Tight * TextSize._34, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineBold42: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_bold), fontSize = TextSize._42, - lineHeight = LineHeight.Tight * TextSize._42, + lineHeight = LineHeight.Tight, + fontWeight = FontWeight.W700, + fontStyle = FontStyle.Normal, + ) + +/** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ +val Source.Typography.HeadlineBold50: TextStyle + get() = BaseTextStyle + TextStyle( + fontFamily = fontFamilyResource(R.font.ghguardianheadline_bold), + fontSize = TextSize._50, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) +// endregion + +// region HeadlineLight + /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineLight14: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_light), fontSize = TextSize._14, - lineHeight = LineHeight.Tight * TextSize._14, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W300, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineLight15: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_light), fontSize = TextSize._15, - lineHeight = LineHeight.Tight * TextSize._15, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W300, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineLight16: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_light), fontSize = TextSize._16, - lineHeight = LineHeight.Tight * TextSize._16, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W300, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineLight17: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_light), fontSize = TextSize._17, - lineHeight = LineHeight.Tight * TextSize._17, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W300, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineLight18: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_light), fontSize = TextSize._18, - lineHeight = LineHeight.Tight * TextSize._18, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W300, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineLight20: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_light), fontSize = TextSize._20, - lineHeight = LineHeight.Tight * TextSize._20, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W300, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineLight22: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_light), fontSize = TextSize._22, - lineHeight = LineHeight.Tight * TextSize._22, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W300, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineLight24: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_light), fontSize = TextSize._24, - lineHeight = LineHeight.Tight * TextSize._24, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W300, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineLight28: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_light), fontSize = TextSize._28, - lineHeight = LineHeight.Tight * TextSize._28, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W300, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineLight34: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_light), fontSize = TextSize._34, - lineHeight = LineHeight.Tight * TextSize._34, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W300, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineLight42: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( + fontFamily = fontFamilyResource(R.font.ghguardianheadline_light), + fontSize = TextSize._42, + lineHeight = LineHeight.Tight, + fontWeight = FontWeight.W300, + fontStyle = FontStyle.Normal, + ) + +/** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ +val Source.Typography.HeadlineLight50: TextStyle + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_light), + fontSize = TextSize._50, + lineHeight = LineHeight.Tight, + fontWeight = FontWeight.W300, + fontStyle = FontStyle.Normal, + ) + +// endregion + +// region HeadlineLightItalic + +/** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ +val Source.Typography.HeadlineLightItalic14: TextStyle + get() = BaseTextStyle + TextStyle( + fontFamily = fontFamilyResource(R.font.ghguardianheadline_lightitalic), + fontSize = TextSize._14, + lineHeight = LineHeight.Tight, + fontWeight = FontWeight.W300, + fontStyle = FontStyle.Normal, + ) + +/** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ +val Source.Typography.HeadlineLightItalic15: TextStyle + get() = BaseTextStyle + TextStyle( + fontFamily = fontFamilyResource(R.font.ghguardianheadline_lightitalic), + fontSize = TextSize._15, + lineHeight = LineHeight.Tight, + fontWeight = FontWeight.W300, + fontStyle = FontStyle.Normal, + ) + +/** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ +val Source.Typography.HeadlineLightItalic16: TextStyle + get() = BaseTextStyle + TextStyle( + fontFamily = fontFamilyResource(R.font.ghguardianheadline_lightitalic), + fontSize = TextSize._16, + lineHeight = LineHeight.Tight, + fontWeight = FontWeight.W300, + fontStyle = FontStyle.Normal, + ) + +/** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ +val Source.Typography.HeadlineLightItalic17: TextStyle + get() = BaseTextStyle + TextStyle( + fontFamily = fontFamilyResource(R.font.ghguardianheadline_lightitalic), + fontSize = TextSize._17, + lineHeight = LineHeight.Tight, + fontWeight = FontWeight.W300, + fontStyle = FontStyle.Normal, + ) + +/** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ +val Source.Typography.HeadlineLightItalic18: TextStyle + get() = BaseTextStyle + TextStyle( + fontFamily = fontFamilyResource(R.font.ghguardianheadline_lightitalic), + fontSize = TextSize._18, + lineHeight = LineHeight.Tight, + fontWeight = FontWeight.W300, + fontStyle = FontStyle.Normal, + ) + +/** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ +val Source.Typography.HeadlineLightItalic20: TextStyle + get() = BaseTextStyle + TextStyle( + fontFamily = fontFamilyResource(R.font.ghguardianheadline_lightitalic), + fontSize = TextSize._20, + lineHeight = LineHeight.Tight, + fontWeight = FontWeight.W300, + fontStyle = FontStyle.Normal, + ) + +/** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ +val Source.Typography.HeadlineLightItalic22: TextStyle + get() = BaseTextStyle + TextStyle( + fontFamily = fontFamilyResource(R.font.ghguardianheadline_lightitalic), + fontSize = TextSize._22, + lineHeight = LineHeight.Tight, + fontWeight = FontWeight.W300, + fontStyle = FontStyle.Normal, + ) + +/** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ +val Source.Typography.HeadlineLightItalic24: TextStyle + get() = BaseTextStyle + TextStyle( + fontFamily = fontFamilyResource(R.font.ghguardianheadline_lightitalic), + fontSize = TextSize._24, + lineHeight = LineHeight.Tight, + fontWeight = FontWeight.W300, + fontStyle = FontStyle.Normal, + ) + +/** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ +val Source.Typography.HeadlineLightItalic28: TextStyle + get() = BaseTextStyle + TextStyle( + fontFamily = fontFamilyResource(R.font.ghguardianheadline_lightitalic), + fontSize = TextSize._28, + lineHeight = LineHeight.Tight, + fontWeight = FontWeight.W300, + fontStyle = FontStyle.Normal, + ) + +/** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ +val Source.Typography.HeadlineLightItalic34: TextStyle + get() = BaseTextStyle + TextStyle( + fontFamily = fontFamilyResource(R.font.ghguardianheadline_lightitalic), + fontSize = TextSize._34, + lineHeight = LineHeight.Tight, + fontWeight = FontWeight.W300, + fontStyle = FontStyle.Normal, + ) + +/** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ +val Source.Typography.HeadlineLightItalic42: TextStyle + get() = BaseTextStyle + TextStyle( + fontFamily = fontFamilyResource(R.font.ghguardianheadline_lightitalic), fontSize = TextSize._42, - lineHeight = LineHeight.Tight * TextSize._42, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W300, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) +/** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ +val Source.Typography.HeadlineLightItalic50: TextStyle + get() = BaseTextStyle + TextStyle( + fontFamily = fontFamilyResource(R.font.ghguardianheadline_lightitalic), + fontSize = TextSize._50, + lineHeight = LineHeight.Tight, + fontWeight = FontWeight.W300, + fontStyle = FontStyle.Normal, + ) + +// endregion + +// region HeadlineMedium + /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMedium14: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_medium), fontSize = TextSize._14, - lineHeight = LineHeight.Tight * TextSize._14, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMedium15: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_medium), fontSize = TextSize._15, - lineHeight = LineHeight.Tight * TextSize._15, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMedium16: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_medium), fontSize = TextSize._16, - lineHeight = LineHeight.Tight * TextSize._16, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMedium17: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_medium), fontSize = TextSize._17, - lineHeight = LineHeight.Tight * TextSize._17, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMedium18: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_medium), fontSize = TextSize._18, - lineHeight = LineHeight.Tight * TextSize._18, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMedium20: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_medium), fontSize = TextSize._20, - lineHeight = LineHeight.Tight * TextSize._20, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMedium22: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_medium), fontSize = TextSize._22, - lineHeight = LineHeight.Tight * TextSize._22, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMedium24: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_medium), fontSize = TextSize._24, - lineHeight = LineHeight.Tight * TextSize._24, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMedium28: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_medium), fontSize = TextSize._28, - lineHeight = LineHeight.Tight * TextSize._28, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMedium34: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_medium), fontSize = TextSize._34, - lineHeight = LineHeight.Tight * TextSize._34, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMedium42: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_medium), fontSize = TextSize._42, - lineHeight = LineHeight.Tight * TextSize._42, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) +/** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ +val Source.Typography.HeadlineMedium50: TextStyle + get() = BaseTextStyle + TextStyle( + fontFamily = fontFamilyResource(R.font.ghguardianheadline_medium), + fontSize = TextSize._50, + lineHeight = LineHeight.Tight, + fontWeight = FontWeight.W500, + fontStyle = FontStyle.Normal, + ) + +// endregion + +// region HeadlineMediumItalic + /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMediumItalic14: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_mediumitalic), fontSize = TextSize._14, - lineHeight = LineHeight.Tight * TextSize._14, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMediumItalic15: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_mediumitalic), fontSize = TextSize._15, - lineHeight = LineHeight.Tight * TextSize._15, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMediumItalic16: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_mediumitalic), fontSize = TextSize._16, - lineHeight = LineHeight.Tight * TextSize._16, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMediumItalic17: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_mediumitalic), fontSize = TextSize._17, - lineHeight = LineHeight.Tight * TextSize._17, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMediumItalic18: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_mediumitalic), fontSize = TextSize._18, - lineHeight = LineHeight.Tight * TextSize._18, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMediumItalic20: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_mediumitalic), fontSize = TextSize._20, - lineHeight = LineHeight.Tight * TextSize._20, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMediumItalic22: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_mediumitalic), fontSize = TextSize._22, - lineHeight = LineHeight.Tight * TextSize._22, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMediumItalic24: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_mediumitalic), fontSize = TextSize._24, - lineHeight = LineHeight.Tight * TextSize._24, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMediumItalic28: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_mediumitalic), fontSize = TextSize._28, - lineHeight = LineHeight.Tight * TextSize._28, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMediumItalic34: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_mediumitalic), fontSize = TextSize._34, - lineHeight = LineHeight.Tight * TextSize._34, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineMediumItalic42: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_mediumitalic), fontSize = TextSize._42, - lineHeight = LineHeight.Tight * TextSize._42, + lineHeight = LineHeight.Tight, + fontWeight = FontWeight.W500, + fontStyle = FontStyle.Italic, + ) + +/** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ +val Source.Typography.HeadlineMediumItalic50: TextStyle + get() = BaseTextStyle + TextStyle( + fontFamily = fontFamilyResource(R.font.ghguardianheadline_mediumitalic), + fontSize = TextSize._50, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) +// endregion + +// region HeadlineSemiBold + /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineSemiBold14: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_semibold), fontSize = TextSize._14, - lineHeight = LineHeight.Tight * TextSize._14, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineSemiBold15: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_semibold), fontSize = TextSize._15, - lineHeight = LineHeight.Tight * TextSize._15, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineSemiBold16: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_semibold), fontSize = TextSize._16, - lineHeight = LineHeight.Tight * TextSize._16, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineSemiBold18: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_semibold), fontSize = TextSize._18, - lineHeight = LineHeight.Tight * TextSize._18, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineSemiBold24: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_semibold), fontSize = TextSize._24, - lineHeight = LineHeight.Tight * TextSize._24, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ val Source.Typography.HeadlineSemiBold28: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.ghguardianheadline_semibold), fontSize = TextSize._28, - lineHeight = LineHeight.Tight * TextSize._28, + lineHeight = LineHeight.Tight, + fontWeight = FontWeight.W500, + fontStyle = FontStyle.Italic, + ) + +/** Use for headlines, headings and any short form text like pull quotes, bylines and titles. */ +val Source.Typography.HeadlineSemiBold50: TextStyle + get() = BaseTextStyle + TextStyle( + fontFamily = fontFamilyResource(R.font.ghguardianheadline_semibold), + fontSize = TextSize._50, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W500, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) +// endregion + +// region TextArticle + /** Use for article body text. */ val Source.Typography.TextArticle15: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_regular), fontSize = TextSize._15, - lineHeight = LineHeight.Loose * TextSize._15, + lineHeight = LineHeight.Loose, fontWeight = FontWeight.W400, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for article body text. */ val Source.Typography.TextArticle17: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_regular), fontSize = TextSize._17, - lineHeight = LineHeight.Loose * TextSize._17, + lineHeight = LineHeight.Loose, fontWeight = FontWeight.W400, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for article body text. */ val Source.Typography.TextArticleBold15: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_medium), fontSize = TextSize._15, - lineHeight = LineHeight.Loose * TextSize._15, + lineHeight = LineHeight.Loose, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for article body text. */ val Source.Typography.TextArticleBold17: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_medium), fontSize = TextSize._17, - lineHeight = LineHeight.Loose * TextSize._17, + lineHeight = LineHeight.Loose, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for article body text. */ val Source.Typography.TextArticleItalic15: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_regularitalic), fontSize = TextSize._15, - lineHeight = LineHeight.Loose * TextSize._15, + lineHeight = LineHeight.Loose, fontWeight = FontWeight.W400, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for article body text. */ val Source.Typography.TextArticleItalic17: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_regularitalic), fontSize = TextSize._17, - lineHeight = LineHeight.Loose * TextSize._17, + lineHeight = LineHeight.Loose, fontWeight = FontWeight.W400, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) +// endregion + +// region TextArticleBoldItalic + /** Use for article body text. */ val Source.Typography.TextArticleBoldItalic15: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_mediumitalic), fontSize = TextSize._15, - lineHeight = LineHeight.Loose * TextSize._15, + lineHeight = LineHeight.Loose, fontWeight = FontWeight.W700, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for article body text. */ val Source.Typography.TextArticleBoldItalic17: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_mediumitalic), fontSize = TextSize._17, - lineHeight = LineHeight.Loose * TextSize._17, + lineHeight = LineHeight.Loose, fontWeight = FontWeight.W700, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) +// endregion + +// region TextEgyptian + /** Use for multiple sentences/paragraphs of text, like paragraphs of text on marketing pages. */ val Source.Typography.TextEgyptian14: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_regular), fontSize = TextSize._14, - lineHeight = LineHeight.Regular * TextSize._14, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for multiple sentences/paragraphs of text, like paragraphs of text on marketing pages. */ val Source.Typography.TextEgyptian15: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_regular), fontSize = TextSize._15, - lineHeight = LineHeight.Regular * TextSize._15, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for multiple sentences/paragraphs of text, like paragraphs of text on marketing pages. */ val Source.Typography.TextEgyptian17: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_regular), fontSize = TextSize._17, - lineHeight = LineHeight.Regular * TextSize._17, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) +// endregion + +// region TextEgyptianBold + /** Use for multiple sentences/paragraphs of text, like paragraphs of text on marketing pages. */ // TODO: 12/04/2024 App doesn't have a bold Egyptian font so using medium val Source.Typography.TextEgyptianBold14: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_medium), fontSize = TextSize._14, - lineHeight = LineHeight.Regular * TextSize._14, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for multiple sentences/paragraphs of text, like paragraphs of text on marketing pages. */ // TODO: 12/04/2024 App doesn't have a bold Egyptian font so using medium val Source.Typography.TextEgyptianBold15: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_medium), fontSize = TextSize._15, - lineHeight = LineHeight.Regular * TextSize._15, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for multiple sentences/paragraphs of text, like paragraphs of text on marketing pages. */ // TODO: 12/04/2024 App doesn't have a bold Egyptian font so using medium val Source.Typography.TextEgyptianBold17: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_medium), fontSize = TextSize._17, - lineHeight = LineHeight.Regular * TextSize._17, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) +// endregion + +// region TextEgyptianBoldItalic + /** Use for multiple sentences/paragraphs of text, like paragraphs of text on marketing pages. */ // TODO: 12/04/2024 App doesn't have a bold Egyptian font so using medium val Source.Typography.TextEgyptianBoldItalic14: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_mediumitalic), fontSize = TextSize._14, - lineHeight = LineHeight.Regular * TextSize._14, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W700, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for multiple sentences/paragraphs of text, like paragraphs of text on marketing pages. */ // TODO: 12/04/2024 App doesn't have a bold Egyptian font so using medium val Source.Typography.TextEgyptianBoldItalic15: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_mediumitalic), fontSize = TextSize._15, - lineHeight = LineHeight.Regular * TextSize._15, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W700, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for multiple sentences/paragraphs of text, like paragraphs of text on marketing pages. */ // TODO: 12/04/2024 App doesn't have a bold Egyptian font so using medium val Source.Typography.TextEgyptianBoldItalic17: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_mediumitalic), fontSize = TextSize._17, - lineHeight = LineHeight.Regular * TextSize._17, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W700, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) +// endregion + +// region TextEgyptianItalic + /** Use for multiple sentences/paragraphs of text, like paragraphs of text on marketing pages. */ val Source.Typography.TextEgyptianItalic14: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_regularitalic), fontSize = TextSize._14, - lineHeight = LineHeight.Regular * TextSize._14, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for multiple sentences/paragraphs of text, like paragraphs of text on marketing pages. */ val Source.Typography.TextEgyptianItalic15: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_regularitalic), fontSize = TextSize._15, - lineHeight = LineHeight.Regular * TextSize._15, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** Use for multiple sentences/paragraphs of text, like paragraphs of text on marketing pages. */ val Source.Typography.TextEgyptianItalic17: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardiantextegyptian_regularitalic), fontSize = TextSize._17, - lineHeight = LineHeight.Regular * TextSize._17, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) +// endregion + +// region TextSans + /** * Use for interactive page elements like buttons and text input fields and for meta * information like datelines, image captions and data visualisations. Use for interactive @@ -802,13 +961,12 @@ val Source.Typography.TextEgyptianItalic17: TextStyle * from editorial content. */ val Source.Typography.TextSans11: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_regular), fontSize = TextSize._11, - lineHeight = LineHeight.Regular * TextSize._11, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -825,13 +983,12 @@ val Source.Typography.TextSans11: TextStyle * from editorial content. */ val Source.Typography.TextSans12: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_regular), fontSize = TextSize._12, - lineHeight = LineHeight.Regular * TextSize._12, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -848,13 +1005,12 @@ val Source.Typography.TextSans12: TextStyle * from editorial content. */ val Source.Typography.TextSans14: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_regular), fontSize = TextSize._14, - lineHeight = LineHeight.Regular * TextSize._14, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -871,13 +1027,12 @@ val Source.Typography.TextSans14: TextStyle * from editorial content. */ val Source.Typography.TextSans15: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_regular), fontSize = TextSize._15, - lineHeight = LineHeight.Regular * TextSize._15, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -894,13 +1049,12 @@ val Source.Typography.TextSans15: TextStyle * from editorial content. */ val Source.Typography.TextSans17: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_regular), fontSize = TextSize._17, - lineHeight = LineHeight.Regular * TextSize._17, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -917,13 +1071,12 @@ val Source.Typography.TextSans17: TextStyle * from editorial content. */ val Source.Typography.TextSans20: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_regular), fontSize = TextSize._20, - lineHeight = LineHeight.Regular * TextSize._20, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -940,13 +1093,12 @@ val Source.Typography.TextSans20: TextStyle * from editorial content. */ val Source.Typography.TextSans24: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_regular), fontSize = TextSize._24, - lineHeight = LineHeight.Regular * TextSize._24, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -963,13 +1115,12 @@ val Source.Typography.TextSans24: TextStyle * from editorial content. */ val Source.Typography.TextSans28: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_regular), fontSize = TextSize._28, - lineHeight = LineHeight.Regular * TextSize._28, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -986,15 +1137,18 @@ val Source.Typography.TextSans28: TextStyle * from editorial content. */ val Source.Typography.TextSans34: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_regular), fontSize = TextSize._34, - lineHeight = LineHeight.Regular * TextSize._34, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) +// endregion + +// region TextSansBold + /** * Use for interactive page elements like buttons and text input fields and for meta * information like datelines, image captions and data visualisations. Use for interactive @@ -1009,13 +1163,12 @@ val Source.Typography.TextSans34: TextStyle * from editorial content. */ val Source.Typography.TextSansBold11: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_bold), fontSize = TextSize._11, - lineHeight = LineHeight.Regular * TextSize._11, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -1032,13 +1185,12 @@ val Source.Typography.TextSansBold11: TextStyle * from editorial content. */ val Source.Typography.TextSansBold12: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_bold), fontSize = TextSize._12, - lineHeight = LineHeight.Regular * TextSize._12, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -1055,13 +1207,12 @@ val Source.Typography.TextSansBold12: TextStyle * from editorial content. */ val Source.Typography.TextSansBold14: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_bold), fontSize = TextSize._14, - lineHeight = LineHeight.Regular * TextSize._14, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -1078,13 +1229,12 @@ val Source.Typography.TextSansBold14: TextStyle * from editorial content. */ val Source.Typography.TextSansBold15: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_bold), fontSize = TextSize._15, - lineHeight = LineHeight.Regular * TextSize._15, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -1101,13 +1251,12 @@ val Source.Typography.TextSansBold15: TextStyle * from editorial content. */ val Source.Typography.TextSansBold17: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_bold), fontSize = TextSize._17, - lineHeight = LineHeight.Regular * TextSize._17, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -1124,13 +1273,12 @@ val Source.Typography.TextSansBold17: TextStyle * from editorial content. */ val Source.Typography.TextSansBold20: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_bold), fontSize = TextSize._20, - lineHeight = LineHeight.Regular * TextSize._20, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -1147,13 +1295,12 @@ val Source.Typography.TextSansBold20: TextStyle * from editorial content. */ val Source.Typography.TextSansBold24: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_bold), fontSize = TextSize._24, - lineHeight = LineHeight.Regular * TextSize._24, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -1170,13 +1317,12 @@ val Source.Typography.TextSansBold24: TextStyle * from editorial content. */ val Source.Typography.TextSansBold28: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_bold), fontSize = TextSize._28, - lineHeight = LineHeight.Regular * TextSize._28, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -1193,15 +1339,18 @@ val Source.Typography.TextSansBold28: TextStyle * from editorial content. */ val Source.Typography.TextSansBold34: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_bold), fontSize = TextSize._34, - lineHeight = LineHeight.Regular * TextSize._34, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) +// endregion + +// region TextSansItalic + /** * Use for interactive page elements like buttons and text input fields and for meta * information like datelines, image captions and data visualisations. Use for interactive @@ -1217,13 +1366,12 @@ val Source.Typography.TextSansBold34: TextStyle */ // TODO: 12/04/2024 App doesn't have an italic text sans font so using regular val Source.Typography.TextSansItalic11: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_regular), fontSize = TextSize._11, - lineHeight = LineHeight.Regular * TextSize._11, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -1240,13 +1388,12 @@ val Source.Typography.TextSansItalic11: TextStyle * from editorial content. */ val Source.Typography.TextSansItalic12: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_regular), fontSize = TextSize._12, - lineHeight = LineHeight.Regular * TextSize._12, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -1263,13 +1410,12 @@ val Source.Typography.TextSansItalic12: TextStyle * from editorial content. */ val Source.Typography.TextSansItalic14: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_regular), fontSize = TextSize._14, - lineHeight = LineHeight.Regular * TextSize._14, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -1286,13 +1432,12 @@ val Source.Typography.TextSansItalic14: TextStyle * from editorial content. */ val Source.Typography.TextSansItalic15: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_regular), fontSize = TextSize._15, - lineHeight = LineHeight.Regular * TextSize._15, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -1309,13 +1454,12 @@ val Source.Typography.TextSansItalic15: TextStyle * from editorial content. */ val Source.Typography.TextSansItalic17: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_regular), fontSize = TextSize._17, - lineHeight = LineHeight.Regular * TextSize._17, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -1332,13 +1476,12 @@ val Source.Typography.TextSansItalic17: TextStyle * from editorial content. */ val Source.Typography.TextSansItalic20: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_regular), fontSize = TextSize._20, - lineHeight = LineHeight.Regular * TextSize._20, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -1355,13 +1498,12 @@ val Source.Typography.TextSansItalic20: TextStyle * from editorial content. */ val Source.Typography.TextSansItalic24: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_regular), fontSize = TextSize._24, - lineHeight = LineHeight.Regular * TextSize._24, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -1378,13 +1520,12 @@ val Source.Typography.TextSansItalic24: TextStyle * from editorial content. */ val Source.Typography.TextSansItalic28: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_regular), fontSize = TextSize._28, - lineHeight = LineHeight.Regular * TextSize._28, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -1401,27 +1542,29 @@ val Source.Typography.TextSansItalic28: TextStyle * from editorial content. */ val Source.Typography.TextSansItalic34: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.guardian_texsan_two_regular), fontSize = TextSize._34, - lineHeight = LineHeight.Regular * TextSize._34, + lineHeight = LineHeight.Regular, fontWeight = FontWeight.W400, fontStyle = FontStyle.Italic, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) +// endregion + +// region Titlepiece + /** * Use for impact. Ideal for marketing messages, page headers and numerals. Use sparingly * and at large sizes only. */ val Source.Typography.Titlepiece42: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.gtguardiantitlepiece_bold), fontSize = TextSize._42, - lineHeight = LineHeight.Tight * TextSize._42, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -1429,13 +1572,12 @@ val Source.Typography.Titlepiece42: TextStyle * and at large sizes only. */ val Source.Typography.Titlepiece50: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.gtguardiantitlepiece_bold), fontSize = TextSize._50, - lineHeight = LineHeight.Tight * TextSize._50, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) /** @@ -1443,19 +1585,20 @@ val Source.Typography.Titlepiece50: TextStyle * and at large sizes only. */ val Source.Typography.Titlepiece70: TextStyle - get() = TextStyle( + get() = BaseTextStyle + TextStyle( fontFamily = fontFamilyResource(R.font.gtguardiantitlepiece_bold), fontSize = TextSize._70, - lineHeight = LineHeight.Tight * TextSize._70, + lineHeight = LineHeight.Tight, fontWeight = FontWeight.W700, fontStyle = FontStyle.Normal, - platformStyle = PlatformTextStyle(includeFontPadding = false), ) +// endregion + private object LineHeight { - const val Tight = 1.15f - const val Regular = 1.3f - const val Loose = 1.4f + val Tight = 1.15.em + val Regular = 1.3.em + val Loose = 1.4.em } @Suppress("ObjectPropertyNaming", "ktlint:standard:backing-property-naming") diff --git a/android/source/src/main/kotlin/com/gu/source/presets/typography/TypographyPreview.kt b/android/source/src/main/kotlin/com/gu/source/presets/typography/TypographyPreview.kt index da93d9f4..a2b561ab 100644 --- a/android/source/src/main/kotlin/com/gu/source/presets/typography/TypographyPreview.kt +++ b/android/source/src/main/kotlin/com/gu/source/presets/typography/TypographyPreview.kt @@ -1,644 +1,540 @@ +@file:Suppress("TooManyFunctions") + package com.gu.source.presets.typography import androidx.annotation.VisibleForTesting +import androidx.compose.foundation.border +import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.ExperimentalLayoutApi -import androidx.compose.foundation.layout.FlowRow import androidx.compose.foundation.layout.padding import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier +import androidx.compose.ui.text.TextStyle import androidx.compose.ui.tooling.preview.Devices import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.gu.source.Source +import com.gu.source.presets.palette.Neutral60 @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) -@OptIn(ExperimentalLayoutApi::class) @Preview(device = Devices.PIXEL_C, showBackground = true, backgroundColor = 0xFFFFFFFF) @Composable -internal fun TypographyPreview() { - Column { - FlowRow { - Text( - text = "headlineBold14", - style = Source.Typography.HeadlineBold14, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineBold15", - style = Source.Typography.HeadlineBold15, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineBold16", - style = Source.Typography.HeadlineBold16, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineBold17", - style = Source.Typography.HeadlineBold17, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineBold18", - style = Source.Typography.HeadlineBold18, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineBold20", - style = Source.Typography.HeadlineBold20, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineBold22", - style = Source.Typography.HeadlineBold22, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineBold24", - style = Source.Typography.HeadlineBold24, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineBold28", - style = Source.Typography.HeadlineBold28, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineBold34", - style = Source.Typography.HeadlineBold34, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineBold42", - style = Source.Typography.HeadlineBold42, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - } - - FlowRow { - Text( - text = "headlineLight14", - style = Source.Typography.HeadlineLight14, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineLight15", - style = Source.Typography.HeadlineLight15, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineLight16", - style = Source.Typography.HeadlineLight16, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineLight17", - style = Source.Typography.HeadlineLight17, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineLight18", - style = Source.Typography.HeadlineLight18, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineLight20", - style = Source.Typography.HeadlineLight20, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineLight22", - style = Source.Typography.HeadlineLight22, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineLight24", - style = Source.Typography.HeadlineLight24, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineLight28", - style = Source.Typography.HeadlineLight28, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineLight34", - style = Source.Typography.HeadlineLight34, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineLight42", - style = Source.Typography.HeadlineLight42, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - } - - FlowRow { - Text( - text = "headlineMedium14", - style = Source.Typography.HeadlineMedium14, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMedium15", - style = Source.Typography.HeadlineMedium15, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMedium16", - style = Source.Typography.HeadlineMedium16, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMedium17", - style = Source.Typography.HeadlineMedium17, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMedium18", - style = Source.Typography.HeadlineMedium18, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMedium20", - style = Source.Typography.HeadlineMedium20, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMedium22", - style = Source.Typography.HeadlineMedium22, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMedium24", - style = Source.Typography.HeadlineMedium24, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMedium28", - style = Source.Typography.HeadlineMedium28, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMedium34", - style = Source.Typography.HeadlineMedium34, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMedium42", - style = Source.Typography.HeadlineMedium42, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - } - - FlowRow { - Text( - text = "headlineMediumItalic14", - style = Source.Typography.HeadlineMediumItalic14, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMediumItalic15", - style = Source.Typography.HeadlineMediumItalic15, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMediumItalic16", - style = Source.Typography.HeadlineMediumItalic16, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMediumItalic17", - style = Source.Typography.HeadlineMediumItalic17, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMediumItalic18", - style = Source.Typography.HeadlineMediumItalic18, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMediumItalic20", - style = Source.Typography.HeadlineMediumItalic20, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMediumItalic22", - style = Source.Typography.HeadlineMediumItalic22, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMediumItalic24", - style = Source.Typography.HeadlineMediumItalic24, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMediumItalic28", - style = Source.Typography.HeadlineMediumItalic28, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMediumItalic34", - style = Source.Typography.HeadlineMediumItalic34, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineMediumItalic42", - style = Source.Typography.HeadlineMediumItalic42, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - } - - FlowRow { - Text( - text = "headlineSemiBold14", - style = Source.Typography.HeadlineSemiBold14, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineSemiBold15", - style = Source.Typography.HeadlineSemiBold15, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineSemiBold16", - style = Source.Typography.HeadlineSemiBold16, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineSemiBold18", - style = Source.Typography.HeadlineSemiBold18, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineSemiBold24", - style = Source.Typography.HeadlineSemiBold24, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "headlineSemiBold28", - style = Source.Typography.HeadlineSemiBold28, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - } - - FlowRow { - Text( - text = "textArticle15", - style = Source.Typography.TextArticle15, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textArticle17", - style = Source.Typography.TextArticle17, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textArticleBold15", - style = Source.Typography.TextArticleBold15, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textArticleBold17", - style = Source.Typography.TextArticleBold17, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textArticleItalic15", - style = Source.Typography.TextArticleItalic15, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textArticleItalic17", - style = Source.Typography.TextArticleItalic17, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textArticleBoldItalic15", - style = Source.Typography.TextArticleBoldItalic15, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textArticleBoldItalic17", - style = Source.Typography.TextArticleBoldItalic17, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - } - - FlowRow { - Text( - text = "textEgyptian14", - style = Source.Typography.TextEgyptian14, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textEgyptian15", - style = Source.Typography.TextEgyptian15, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textEgyptian17", - style = Source.Typography.TextEgyptian17, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textEgyptianBold14", - style = Source.Typography.TextEgyptianBold14, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textEgyptianBold15", - style = Source.Typography.TextEgyptianBold15, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textEgyptianBold17", - style = Source.Typography.TextEgyptianBold17, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textEgyptianBoldItalic14", - style = Source.Typography.TextEgyptianBoldItalic14, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textEgyptianBoldItalic15", - style = Source.Typography.TextEgyptianBoldItalic15, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textEgyptianBoldItalic17", - style = Source.Typography.TextEgyptianBoldItalic17, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textEgyptianItalic14", - style = Source.Typography.TextEgyptianItalic14, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textEgyptianItalic15", - style = Source.Typography.TextEgyptianItalic15, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textEgyptianItalic17", - style = Source.Typography.TextEgyptianItalic17, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - } - - FlowRow { - Text( - text = "textSans11", - style = Source.Typography.TextSans11, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textSans12", - style = Source.Typography.TextSans12, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textSans14", - style = Source.Typography.TextSans14, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textSans15", - style = Source.Typography.TextSans15, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textSans17", - style = Source.Typography.TextSans17, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textSans20", - style = Source.Typography.TextSans20, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textSans24", - style = Source.Typography.TextSans24, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textSans28", - style = Source.Typography.TextSans28, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textSans34", - style = Source.Typography.TextSans34, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - } - - FlowRow { - Text( - text = "textSansBold11", - style = Source.Typography.TextSansBold11, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textSansBold12", - style = Source.Typography.TextSansBold12, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textSansBold14", - style = Source.Typography.TextSansBold14, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textSansBold15", - style = Source.Typography.TextSansBold15, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textSansBold17", - style = Source.Typography.TextSansBold17, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textSansBold20", - style = Source.Typography.TextSansBold20, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textSansBold24", - style = Source.Typography.TextSansBold24, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textSansBold28", - style = Source.Typography.TextSansBold28, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - - Text( - text = "textSansBold34", - style = Source.Typography.TextSansBold34, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - } - - FlowRow { - Text( - text = "textSansItalic11", - style = Source.Typography.TextSansItalic11, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) +internal fun HeadlineBoldPreview() { + Column( + modifier = Modifier.padding(8.dp), + verticalArrangement = Arrangement.spacedBy(8.dp), + ) { + TextPreview( + text = "HeadlineBold14", + style = Source.Typography.HeadlineBold14, + ) + TextPreview( + text = "HeadlineBold15", + style = Source.Typography.HeadlineBold15, + ) + TextPreview( + text = "HeadlineBold16", + style = Source.Typography.HeadlineBold16, + ) + TextPreview( + text = "HeadlineBold17", + style = Source.Typography.HeadlineBold17, + ) + TextPreview( + text = "HeadlineBold18", + style = Source.Typography.HeadlineBold18, + ) + TextPreview( + text = "HeadlineBold20", + style = Source.Typography.HeadlineBold20, + ) + TextPreview( + text = "HeadlineBold22", + style = Source.Typography.HeadlineBold22, + ) + TextPreview( + text = "HeadlineBold24", + style = Source.Typography.HeadlineBold24, + ) + TextPreview( + text = "HeadlineBold28", + style = Source.Typography.HeadlineBold28, + ) + TextPreview( + text = "HeadlineBold34", + style = Source.Typography.HeadlineBold34, + ) + TextPreview( + text = "HeadlineBold42", + style = Source.Typography.HeadlineBold42, + ) + TextPreview( + text = "HeadlineBold50", + style = Source.Typography.HeadlineBold50, + ) + } +} - Text( - text = "textSansItalic12", - style = Source.Typography.TextSansItalic12, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) +@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) +@Preview(device = Devices.PIXEL_C, showBackground = true, backgroundColor = 0xFFFFFFFF) +@Composable +internal fun HeadlineLightPreview() { + Column( + modifier = Modifier.padding(8.dp), + verticalArrangement = Arrangement.spacedBy(8.dp), + ) { + TextPreview( + text = "HeadlineLight14", + style = Source.Typography.HeadlineLight14, + ) + TextPreview( + text = "HeadlineLight15", + style = Source.Typography.HeadlineLight15, + ) + TextPreview( + text = "HeadlineLight16", + style = Source.Typography.HeadlineLight16, + ) + TextPreview( + text = "HeadlineLight17", + style = Source.Typography.HeadlineLight17, + ) + TextPreview( + text = "HeadlineLight18", + style = Source.Typography.HeadlineLight18, + ) + TextPreview( + text = "HeadlineLight20", + style = Source.Typography.HeadlineLight20, + ) + TextPreview( + text = "HeadlineLight22", + style = Source.Typography.HeadlineLight22, + ) + TextPreview( + text = "HeadlineLight24", + style = Source.Typography.HeadlineLight24, + ) + TextPreview( + text = "HeadlineLight28", + style = Source.Typography.HeadlineLight28, + ) + TextPreview( + text = "HeadlineLight34", + style = Source.Typography.HeadlineLight34, + ) + TextPreview( + text = "HeadlineLight42", + style = Source.Typography.HeadlineLight42, + ) + TextPreview( + text = "HeadlineLight50", + style = Source.Typography.HeadlineLight50, + ) + } +} - Text( - text = "textSansItalic14", - style = Source.Typography.TextSansItalic14, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) +@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) +@Preview(device = Devices.PIXEL_C, showBackground = true, backgroundColor = 0xFFFFFFFF) +@Composable +internal fun HeadlineLightItalicPreview() { + Column( + modifier = Modifier.padding(8.dp), + verticalArrangement = Arrangement.spacedBy(8.dp), + ) { + TextPreview( + text = "HeadlineLightItalic14", + style = Source.Typography.HeadlineLightItalic14, + ) + TextPreview( + text = "HeadlineLightItalic15", + style = Source.Typography.HeadlineLightItalic15, + ) + TextPreview( + text = "HeadlineLightItalic16", + style = Source.Typography.HeadlineLightItalic16, + ) + TextPreview( + text = "HeadlineLightItalic17", + style = Source.Typography.HeadlineLightItalic17, + ) + TextPreview( + text = "HeadlineLightItalic18", + style = Source.Typography.HeadlineLightItalic18, + ) + TextPreview( + text = "HeadlineLightItalic20", + style = Source.Typography.HeadlineLightItalic20, + ) + TextPreview( + text = "HeadlineLightItalic22", + style = Source.Typography.HeadlineLightItalic22, + ) + TextPreview( + text = "HeadlineLightItalic24", + style = Source.Typography.HeadlineLightItalic24, + ) + TextPreview( + text = "HeadlineLightItalic28", + style = Source.Typography.HeadlineLightItalic28, + ) + TextPreview( + text = "HeadlineLightItalic34", + style = Source.Typography.HeadlineLightItalic34, + ) + TextPreview( + text = "HeadlineLightItalic42", + style = Source.Typography.HeadlineLightItalic42, + ) + TextPreview( + text = "HeadlineLightItalic50", + style = Source.Typography.HeadlineLightItalic50, + ) + } +} - Text( - text = "textSansItalic15", - style = Source.Typography.TextSansItalic15, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) +@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) +@Preview(device = Devices.PIXEL_C, showBackground = true, backgroundColor = 0xFFFFFFFF) +@Composable +internal fun HeadlineMediumPreview() { + Column( + modifier = Modifier.padding(8.dp), + verticalArrangement = Arrangement.spacedBy(8.dp), + ) { + TextPreview( + text = "HeadlineMedium14", + style = Source.Typography.HeadlineMedium14, + ) + TextPreview( + text = "HeadlineMedium15", + style = Source.Typography.HeadlineMedium15, + ) + TextPreview( + text = "HeadlineMedium16", + style = Source.Typography.HeadlineMedium16, + ) + TextPreview( + text = "HeadlineMedium17", + style = Source.Typography.HeadlineMedium17, + ) + TextPreview( + text = "HeadlineMedium18", + style = Source.Typography.HeadlineMedium18, + ) + TextPreview( + text = "HeadlineMedium20", + style = Source.Typography.HeadlineMedium20, + ) + TextPreview( + text = "HeadlineMedium22", + style = Source.Typography.HeadlineMedium22, + ) + TextPreview( + text = "HeadlineMedium24", + style = Source.Typography.HeadlineMedium24, + ) + TextPreview( + text = "HeadlineMedium28", + style = Source.Typography.HeadlineMedium28, + ) + TextPreview( + text = "HeadlineMedium34", + style = Source.Typography.HeadlineMedium34, + ) + TextPreview( + text = "HeadlineMedium42", + style = Source.Typography.HeadlineMedium42, + ) + TextPreview( + text = "HeadlineMedium50", + style = Source.Typography.HeadlineMedium50, + ) + } +} - Text( - text = "textSansItalic17", - style = Source.Typography.TextSansItalic17, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) +@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) +@Preview(device = Devices.PIXEL_C, showBackground = true, backgroundColor = 0xFFFFFFFF) +@Composable +internal fun HeadlineMediumItalicPreview() { + Column( + modifier = Modifier.padding(8.dp), + verticalArrangement = Arrangement.spacedBy(8.dp), + ) { + TextPreview( + text = "HeadlineMediumItalic14", + style = Source.Typography.HeadlineMediumItalic14, + ) + TextPreview( + text = "HeadlineMediumItalic15", + style = Source.Typography.HeadlineMediumItalic15, + ) + TextPreview( + text = "HeadlineMediumItalic16", + style = Source.Typography.HeadlineMediumItalic16, + ) + TextPreview( + text = "HeadlineMediumItalic17", + style = Source.Typography.HeadlineMediumItalic17, + ) + TextPreview( + text = "HeadlineMediumItalic18", + style = Source.Typography.HeadlineMediumItalic18, + ) + TextPreview( + text = "HeadlineMediumItalic20", + style = Source.Typography.HeadlineMediumItalic20, + ) + TextPreview( + text = "HeadlineMediumItalic22", + style = Source.Typography.HeadlineMediumItalic22, + ) + TextPreview( + text = "HeadlineMediumItalic24", + style = Source.Typography.HeadlineMediumItalic24, + ) + TextPreview( + text = "HeadlineMediumItalic28", + style = Source.Typography.HeadlineMediumItalic28, + ) + TextPreview( + text = "HeadlineMediumItalic34", + style = Source.Typography.HeadlineMediumItalic34, + ) + TextPreview( + text = "HeadlineMediumItalic42", + style = Source.Typography.HeadlineMediumItalic42, + ) + TextPreview( + text = "HeadlineMediumItalic50", + style = Source.Typography.HeadlineMediumItalic50, + ) + } +} - Text( - text = "textSansItalic20", - style = Source.Typography.TextSansItalic20, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) +@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) +@Preview(device = Devices.PIXEL_C, showBackground = true, backgroundColor = 0xFFFFFFFF) +@Composable +internal fun HeadlineSemiBoldPreview() { + Column( + modifier = Modifier.padding(8.dp), + verticalArrangement = Arrangement.spacedBy(8.dp), + ) { + TextPreview( + text = "HeadlineSemiBold14", + style = Source.Typography.HeadlineSemiBold14, + ) + TextPreview( + text = "HeadlineSemiBold15", + style = Source.Typography.HeadlineSemiBold15, + ) + TextPreview( + text = "HeadlineSemiBold16", + style = Source.Typography.HeadlineSemiBold16, + ) + TextPreview( + text = "HeadlineSemiBold18", + style = Source.Typography.HeadlineSemiBold18, + ) + TextPreview( + text = "HeadlineSemiBold24", + style = Source.Typography.HeadlineSemiBold24, + ) + TextPreview( + text = "HeadlineSemiBold28", + style = Source.Typography.HeadlineSemiBold28, + ) + TextPreview( + text = "HeadlineSemiBold50", + style = Source.Typography.HeadlineSemiBold50, + ) + } +} - Text( - text = "textSansItalic24", - style = Source.Typography.TextSansItalic24, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) +@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) +@Preview(device = Devices.PIXEL_C, showBackground = true, backgroundColor = 0xFFFFFFFF) +@Composable +internal fun TextArticlePreview() { + Column( + modifier = Modifier.padding(8.dp), + verticalArrangement = Arrangement.spacedBy(8.dp), + ) { + TextPreview( + text = "TextArticle15", + style = Source.Typography.TextArticle15, + ) + TextPreview( + text = "TextArticle17", + style = Source.Typography.TextArticle17, + ) + TextPreview( + text = "TextArticleBold15", + style = Source.Typography.TextArticleBold15, + ) + TextPreview( + text = "TextArticleBold17", + style = Source.Typography.TextArticleBold17, + ) + TextPreview( + text = "TextArticleItalic15", + style = Source.Typography.TextArticleItalic15, + ) + TextPreview( + text = "TextArticleItalic17", + style = Source.Typography.TextArticleItalic17, + ) + TextPreview( + text = "TextArticleBoldItalic15", + style = Source.Typography.TextArticleBoldItalic15, + ) + TextPreview( + text = "TextArticleBoldItalic17", + style = Source.Typography.TextArticleBoldItalic17, + ) + } +} - Text( - text = "textSansItalic28", - style = Source.Typography.TextSansItalic28, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) +@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) +@Preview(device = Devices.PIXEL_C, showBackground = true, backgroundColor = 0xFFFFFFFF) +@Composable +internal fun TextEgyptianPreview() { + Column( + modifier = Modifier.padding(8.dp), + verticalArrangement = Arrangement.spacedBy(8.dp), + ) { + TextPreview( + text = "TextEgyptian14", + style = Source.Typography.TextEgyptian14, + ) + TextPreview( + text = "TextEgyptian15", + style = Source.Typography.TextEgyptian15, + ) + TextPreview( + text = "TextEgyptian17", + style = Source.Typography.TextEgyptian17, + ) + TextPreview( + text = "TextEgyptianBold14", + style = Source.Typography.TextEgyptianBold14, + ) + TextPreview( + text = "TextEgyptianBold15", + style = Source.Typography.TextEgyptianBold15, + ) + TextPreview( + text = "TextEgyptianBold17", + style = Source.Typography.TextEgyptianBold17, + ) + TextPreview( + text = "TextEgyptianBoldItalic14", + style = Source.Typography.TextEgyptianBoldItalic14, + ) + TextPreview( + text = "TextEgyptianBoldItalic15", + style = Source.Typography.TextEgyptianBoldItalic15, + ) + TextPreview( + text = "TextEgyptianBoldItalic17", + style = Source.Typography.TextEgyptianBoldItalic17, + ) + TextPreview( + text = "TextEgyptianItalic14", + style = Source.Typography.TextEgyptianItalic14, + ) + TextPreview( + text = "TextEgyptianItalic15", + style = Source.Typography.TextEgyptianItalic15, + ) + TextPreview( + text = "TextEgyptianItalic17", + style = Source.Typography.TextEgyptianItalic17, + ) + } +} - Text( - text = "textSansItalic34", - style = Source.Typography.TextSansItalic34, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - } +@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) +@Preview(device = Devices.PIXEL_C, showBackground = true, backgroundColor = 0xFFFFFFFF) +@Composable +internal fun TextSansPreview() { + Column( + modifier = Modifier.padding(8.dp), + verticalArrangement = Arrangement.spacedBy(8.dp), + ) { + TextPreview(text = "TextSans11", style = Source.Typography.TextSans11) + TextPreview(text = "TextSans12", style = Source.Typography.TextSans12) + TextPreview(text = "TextSans14", style = Source.Typography.TextSans14) + TextPreview(text = "TextSans15", style = Source.Typography.TextSans15) + TextPreview(text = "TextSans17", style = Source.Typography.TextSans17) + TextPreview(text = "TextSans20", style = Source.Typography.TextSans20) + TextPreview(text = "TextSans24", style = Source.Typography.TextSans24) + TextPreview(text = "TextSans28", style = Source.Typography.TextSans28) + TextPreview(text = "TextSans34", style = Source.Typography.TextSans34) + } +} - FlowRow { - Text( - text = "titlepiece42", - style = Source.Typography.Titlepiece42, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) +@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) +@Preview(device = Devices.PIXEL_C, showBackground = true, backgroundColor = 0xFFFFFFFF) +@Composable +internal fun TextSansBoldPreview() { + Column( + modifier = Modifier.padding(8.dp), + verticalArrangement = Arrangement.spacedBy(8.dp), + ) { + TextPreview(text = "TextSansBold11", style = Source.Typography.TextSansBold11) + TextPreview(text = "TextSansBold12", style = Source.Typography.TextSansBold12) + TextPreview(text = "TextSansBold14", style = Source.Typography.TextSansBold14) + TextPreview(text = "TextSansBold15", style = Source.Typography.TextSansBold15) + TextPreview(text = "TextSansBold17", style = Source.Typography.TextSansBold17) + TextPreview(text = "TextSansBold20", style = Source.Typography.TextSansBold20) + TextPreview(text = "TextSansBold24", style = Source.Typography.TextSansBold24) + TextPreview(text = "TextSansBold28", style = Source.Typography.TextSansBold28) + TextPreview(text = "TextSansBold34", style = Source.Typography.TextSansBold34) + } +} - Text( - text = "titlepiece50", - style = Source.Typography.Titlepiece50, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) +@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) +@Preview(device = Devices.PIXEL_C, showBackground = true, backgroundColor = 0xFFFFFFFF) +@Composable +internal fun TextSansItalicPreview() { + Column( + modifier = Modifier.padding(8.dp), + verticalArrangement = Arrangement.spacedBy(8.dp), + ) { + TextPreview(text = "TextSansItalic11", style = Source.Typography.TextSansItalic11) + TextPreview(text = "TextSansItalic12", style = Source.Typography.TextSansItalic12) + TextPreview(text = "TextSansItalic14", style = Source.Typography.TextSansItalic14) + TextPreview(text = "TextSansItalic15", style = Source.Typography.TextSansItalic15) + TextPreview(text = "TextSansItalic17", style = Source.Typography.TextSansItalic17) + TextPreview(text = "TextSansItalic20", style = Source.Typography.TextSansItalic20) + TextPreview(text = "TextSansItalic24", style = Source.Typography.TextSansItalic24) + TextPreview(text = "TextSansItalic28", style = Source.Typography.TextSansItalic28) + TextPreview(text = "TextSansItalic34", style = Source.Typography.TextSansItalic34) + } +} - Text( - text = "titlepiece70", - style = Source.Typography.Titlepiece70, - modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp), - ) - } +@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) +@Preview(device = Devices.PIXEL_C, showBackground = true, backgroundColor = 0xFFFFFFFF) +@Composable +internal fun TitlepiecePreview() { + Column( + modifier = Modifier.padding(8.dp), + verticalArrangement = Arrangement.spacedBy(8.dp), + ) { + TextPreview(text = "Titlepiece42", style = Source.Typography.Titlepiece42) + TextPreview(text = "Titlepiece50", style = Source.Typography.Titlepiece50) + TextPreview(text = "Titlepiece70", style = Source.Typography.Titlepiece70) } +} + +@Composable +private fun TextPreview(text: String, style: TextStyle, modifier: Modifier = Modifier) { + Text( + text = text, + style = style, + modifier = modifier.border( + width = 1.dp, + color = Source.Palette.Neutral60, + ), + ) } \ No newline at end of file diff --git a/android/source/src/test/kotlin/com/gu/source/presets/typography/TypographyPreviewTest.kt b/android/source/src/test/kotlin/com/gu/source/presets/typography/TypographyPreviewTest.kt index 4ae84bab..690c8ff0 100644 --- a/android/source/src/test/kotlin/com/gu/source/presets/typography/TypographyPreviewTest.kt +++ b/android/source/src/test/kotlin/com/gu/source/presets/typography/TypographyPreviewTest.kt @@ -6,21 +6,120 @@ import androidx.compose.ui.Modifier import com.gu.source.Source import com.gu.source.presets.palette.Neutral100 import com.gu.source.utils.paparazzi.BaseDeviceConfig -import com.gu.source.utils.paparazzi.createScreenPaparazziRule +import com.gu.source.utils.paparazzi.createComponentPaparazziRule import org.junit.Rule import org.junit.Test class TypographyPreviewTest { @get:Rule - val paparazzi = createScreenPaparazziRule( + val paparazzi = createComponentPaparazziRule( deviceConfig = BaseDeviceConfig.Tablet.deviceConfig, ) @Test - fun snapshot() { + fun headlineBold() { paparazzi.snapshot { Box(modifier = Modifier.background(Source.Palette.Neutral100)) { - TypographyPreview() + HeadlineBoldPreview() + } + } + } + + @Test + fun headlineLight() { + paparazzi.snapshot { + Box(modifier = Modifier.background(Source.Palette.Neutral100)) { + HeadlineLightPreview() + } + } + } + + @Test + fun headlineLightItalic() { + paparazzi.snapshot { + Box(modifier = Modifier.background(Source.Palette.Neutral100)) { + HeadlineLightItalicPreview() + } + } + } + + @Test + fun headlineMedium() { + paparazzi.snapshot { + Box(modifier = Modifier.background(Source.Palette.Neutral100)) { + HeadlineMediumPreview() + } + } + } + + @Test + fun headlineMediumItalic() { + paparazzi.snapshot { + Box(modifier = Modifier.background(Source.Palette.Neutral100)) { + HeadlineMediumItalicPreview() + } + } + } + + @Test + fun headlineSemiBold() { + paparazzi.snapshot { + Box(modifier = Modifier.background(Source.Palette.Neutral100)) { + HeadlineSemiBoldPreview() + } + } + } + + @Test + fun textArticle() { + paparazzi.snapshot { + Box(modifier = Modifier.background(Source.Palette.Neutral100)) { + TextArticlePreview() + } + } + } + + @Test + fun textEgyptian() { + paparazzi.snapshot { + Box(modifier = Modifier.background(Source.Palette.Neutral100)) { + TextEgyptianPreview() + } + } + } + + @Test + fun textSans() { + paparazzi.snapshot { + Box(modifier = Modifier.background(Source.Palette.Neutral100)) { + TextSansPreview() + } + } + } + + @Test + fun textSansBold() { + paparazzi.snapshot { + Box(modifier = Modifier.background(Source.Palette.Neutral100)) { + TextSansBoldPreview() + } + } + } + + @Test + fun textSansItalic() { + paparazzi.snapshot { + Box(modifier = Modifier.background(Source.Palette.Neutral100)) { + TextSansItalicPreview() + } + } + } + + @Test + fun titlepiece() { + paparazzi.snapshot { + Box(modifier = Modifier.background(Source.Palette.Neutral100)) { + TitlepiecePreview() } } } diff --git a/android/source/src/test/snapshots/images/com.gu.source.components.pager_PagerProgressBarTest_pagerProgressBar[Phone,NIGHT].png b/android/source/src/test/snapshots/images/com.gu.source.components.pager_PagerProgressBarTest_pagerProgressBar[Phone,NIGHT].png index d25013b8..f9b00e37 100644 Binary files a/android/source/src/test/snapshots/images/com.gu.source.components.pager_PagerProgressBarTest_pagerProgressBar[Phone,NIGHT].png and b/android/source/src/test/snapshots/images/com.gu.source.components.pager_PagerProgressBarTest_pagerProgressBar[Phone,NIGHT].png differ diff --git a/android/source/src/test/snapshots/images/com.gu.source.components.pager_PagerProgressBarTest_pagerProgressBar[Phone,NOTNIGHT].png b/android/source/src/test/snapshots/images/com.gu.source.components.pager_PagerProgressBarTest_pagerProgressBar[Phone,NOTNIGHT].png index ef5ded8b..f6595872 100644 Binary files a/android/source/src/test/snapshots/images/com.gu.source.components.pager_PagerProgressBarTest_pagerProgressBar[Phone,NOTNIGHT].png and b/android/source/src/test/snapshots/images/com.gu.source.components.pager_PagerProgressBarTest_pagerProgressBar[Phone,NOTNIGHT].png differ diff --git a/android/source/src/test/snapshots/images/com.gu.source.components.pager_PagerProgressBarTest_pagerProgressBar[Tablet,NIGHT].png b/android/source/src/test/snapshots/images/com.gu.source.components.pager_PagerProgressBarTest_pagerProgressBar[Tablet,NIGHT].png index 3322ae0d..a6d2461c 100644 Binary files a/android/source/src/test/snapshots/images/com.gu.source.components.pager_PagerProgressBarTest_pagerProgressBar[Tablet,NIGHT].png and b/android/source/src/test/snapshots/images/com.gu.source.components.pager_PagerProgressBarTest_pagerProgressBar[Tablet,NIGHT].png differ diff --git a/android/source/src/test/snapshots/images/com.gu.source.components.pager_PagerProgressBarTest_pagerProgressBar[Tablet,NOTNIGHT].png b/android/source/src/test/snapshots/images/com.gu.source.components.pager_PagerProgressBarTest_pagerProgressBar[Tablet,NOTNIGHT].png index 09a1edd4..1590f4f3 100644 Binary files a/android/source/src/test/snapshots/images/com.gu.source.components.pager_PagerProgressBarTest_pagerProgressBar[Tablet,NOTNIGHT].png and b/android/source/src/test/snapshots/images/com.gu.source.components.pager_PagerProgressBarTest_pagerProgressBar[Tablet,NOTNIGHT].png differ diff --git a/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_headlineBold.png b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_headlineBold.png new file mode 100644 index 00000000..65a0b17c Binary files /dev/null and b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_headlineBold.png differ diff --git a/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_headlineLight.png b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_headlineLight.png new file mode 100644 index 00000000..b88bf9e2 Binary files /dev/null and b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_headlineLight.png differ diff --git a/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_headlineLightItalic.png b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_headlineLightItalic.png new file mode 100644 index 00000000..16fcd8dd Binary files /dev/null and b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_headlineLightItalic.png differ diff --git a/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_headlineMedium.png b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_headlineMedium.png new file mode 100644 index 00000000..73f6f356 Binary files /dev/null and b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_headlineMedium.png differ diff --git a/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_headlineMediumItalic.png b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_headlineMediumItalic.png new file mode 100644 index 00000000..62352337 Binary files /dev/null and b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_headlineMediumItalic.png differ diff --git a/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_headlineSemiBold.png b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_headlineSemiBold.png new file mode 100644 index 00000000..c265873c Binary files /dev/null and b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_headlineSemiBold.png differ diff --git a/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_snapshot.png b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_snapshot.png deleted file mode 100644 index 2adadfe9..00000000 Binary files a/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_snapshot.png and /dev/null differ diff --git a/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_textArticle.png b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_textArticle.png new file mode 100644 index 00000000..b48b7185 Binary files /dev/null and b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_textArticle.png differ diff --git a/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_textEgyptian.png b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_textEgyptian.png new file mode 100644 index 00000000..da6dcd67 Binary files /dev/null and b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_textEgyptian.png differ diff --git a/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_textSans.png b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_textSans.png new file mode 100644 index 00000000..e461197d Binary files /dev/null and b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_textSans.png differ diff --git a/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_textSansBold.png b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_textSansBold.png new file mode 100644 index 00000000..653dc395 Binary files /dev/null and b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_textSansBold.png differ diff --git a/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_textSansItalic.png b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_textSansItalic.png new file mode 100644 index 00000000..9be05f87 Binary files /dev/null and b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_textSansItalic.png differ diff --git a/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_titlepiece.png b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_titlepiece.png new file mode 100644 index 00000000..452f791a Binary files /dev/null and b/android/source/src/test/snapshots/images/com.gu.source.presets.typography_TypographyPreviewTest_titlepiece.png differ