Mark
10/17/2023, 6:03 AMval fontFamily = FontFamily(Font(filename, LocalContext.current.assets))
and
val typeface = android.graphics.Typeface.createFromAsset(LocalContext.current.assets, filename)!!
val fontFamily = FontFamily(typeface)
Because I’m finding that fontWeight = FontWeight.Bold
works with the first, but not the second. FontSynthesis.All
makes no difference in both cases.
EDIT: I see the first one does this under the hood, so I guess that explains it:
Typeface.Builder(assetManager, path)
.setFontVariationSettings(variationSettings.toVariationSettings(context))
.build()