@@ -13,17 +13,13 @@ import androidx.compose.ui.text.style.TextAlign
1313import androidx.compose.ui.unit.sp
1414import com.getcode.R
1515
16- @OptIn(ExperimentalTextApi ::class )
1716private val Avenir = FontFamily (
1817 Font (R .font.avenir_next_regular, FontWeight .Thin ),
1918 Font (R .font.avenir_next_regular, FontWeight .ExtraLight ),
2019 Font (R .font.avenir_next_regular, FontWeight .Light ),
2120 Font (R .font.avenir_next_regular, FontWeight .Normal ),
2221 Font (R .font.avenir_next_medium, FontWeight .Medium ),
23- Font (
24- resId = R .font.avenir_next_demi,
25- weight = FontWeight .SemiBold ,
26- ),
22+ Font (R .font.avenir_next_demi, FontWeight .SemiBold ),
2723 Font (R .font.avenir_next_demi, FontWeight .Bold ),
2824 Font (R .font.avenir_next_demi, FontWeight .ExtraBold ),
2925 Font (R .font.avenir_next_demi, FontWeight .Black )
@@ -131,14 +127,4 @@ val Typography.displayLarge: TextStyle
131127 @Composable get() = h1.copy(fontSize = 55 .sp)
132128
133129fun TextStyle.withRobotoMono (weight : FontWeight ? = this.fontWeight) = with (RobotoMono , weight)
134- fun TextStyle.with (fontFamily : FontFamily , weight : FontWeight ? = this.fontWeight): TextStyle = copy(fontFamily = fontFamily, fontWeight = weight)
135-
136- fun ascenderHeight (ascenderHeight : Float ): FontVariation .Setting {
137- require(ascenderHeight in 649f .. 854f ) { " 'Ascender Height' must be in 649f..854f" }
138- return FontVariation .Setting (" YTAS" , ascenderHeight)
139- }
140-
141- fun counterWidth (counterWidth : Int ): FontVariation .Setting {
142- require(counterWidth in 323 .. 603 ) { " 'Counter width' must be in 323..603" }
143- return FontVariation .Setting (" XTRA" , counterWidth.toFloat())
144- }
130+ fun TextStyle.with (fontFamily : FontFamily , weight : FontWeight ? = this.fontWeight): TextStyle = copy(fontFamily = fontFamily, fontWeight = weight)
0 commit comments