https://kotlinlang.org logo
Title
m

mayojava

11/12/2020, 10:01 AM
What is the way to add images and font assets to a compose desktop project and how will they be referenced in code?
s

Se7eN

11/12/2020, 10:27 AM
Add your fonts to the
resource
directory and use them like this:
val JosefinSans = fontFamily(
    font(alias = "JosefinSans-Light", path = "JosefinSans-Light.ttf", weight = FontWeight.W300)
)
Here, JosefinSans-Light.ttf is in the resource directory. You can create a sub folder for fonts.
👍 3
m

mayojava

11/12/2020, 10:29 AM
👍