Resolved text not drawing on canvas (Intel Mac only) if longer than one character

When I try to draw text on a canvas that is longer than one character nothing is happening. A single character string works. It works fine on both of my M1 Macs but fails on the Intel Mac book (Sonoma 14.4.1).

Here is how to reproduce it:

struct ContentView: View {
    var body: some View {
        Canvas { ctx, size in
            let res = ctx.resolve(Text("H"))
            ctx.draw(res, at: CGPoint(x: 100, y: 100))
            let res1 = ctx.resolve(Text("Hello"))
            ctx.draw(res1, at: CGPoint(x: 100, y: 150))
        }
    }
}

The second text doesn't show.

I tested on MacBook Pro (15", 2016) 2,7 GHz Intel Core i7 4 core, MacOS 12.7.1 (21G920)

With Xcode Version 14.2 (14C18).

It works in simulator iPhone 14 Pro iOS 16.2.

Also tested on Mac itself and it works:

Resolved text not drawing on canvas (Intel Mac only) if longer than one character
 
 
Q