// Copyright © 2022 Olo Inc. All rights reserved. // This software is made available under the Olo Pay SDK License (See LICENSE.md file) package com.olopaysdkreactnative.data // FontWeight enum is to enforce standard font weights as described in Android documentation // https://developer.android.com/reference/kotlin/android/graphics/Typeface#create // https://android.googlesource.com/platform/frameworks/base/+/master/data/fonts/fonts.xml enum class FontWeight(val value: Int) { UltraLight(100), Thin(200), Light(300), Regular(400), Medium(500), SemiBold(600), Bold(700), ExtraBold(800), Black(900); companion object { internal fun convertFrom(weight: String?): FontWeight { return when (weight) { "100" -> UltraLight "200" -> Thin "300" -> Light "400" -> Regular "500" -> Medium "600" -> SemiBold "700" -> Bold "800" -> ExtraBold "900" -> Black else -> Regular } } } }