If it helps you use Color.clear
ZStack {
Text("12345 KB of 12345 KB") // Biggest possible string
.foregroundColor(Color.clear) // << here !!
Text("\(bytes) of \(totBytes)")
}
CLICK HERE to find out more related problems solutions.