title: How can I show a fraction with SwiftUI
body: <p>I am trying to represent a fraction with denominator larger than 9 in a SwiftUI Text.</p>
  <p>I can implement this using individual elements and applying offsets but that get's a bit messy as the fractions change dynamically.</p>
  <p>Is there a way to do this using attributedText?</p>
  <p>I came across thi UIFont extension with deprecated methods and wondering if anything similar that can be used with SwiftUI:</p>
  <pre><code>extension UIFont {
      static func fractionFont(ofSize pointSize: CGFloat) -&gt; UIFont {
          let systemFontDesc = UIFont.systemFont(ofSize: pointSize).fontDescriptor
          let fractionFontDesc = systemFontDesc.addingAttributes(
              [
                  UIFontDescriptor.AttributeName.featureSettings: [
                      [
                          UIFontDescriptor.FeatureKey.featureIdentifier: kFractionsType,
                          UIFontDescriptor.FeatureKey.typeIdentifier: kDiagonalFractionsSelector,
                      ], ]
              ] )
          return UIFont(descriptor: fractionFontDesc, size:pointSize)
      }
  }
  </code></pre>