Skip to content

Instantly share code, notes, and snippets.

@Koze
Created May 8, 2020 16:28
Show Gist options
  • Save Koze/17050bcdab3e578aff993f193e27a45a to your computer and use it in GitHub Desktop.
Save Koze/17050bcdab3e578aff993f193e27a45a to your computer and use it in GitHub Desktop.
Japanese font without Japanese character causes the clip at the bottom. A workaround that doesn't work.
import SwiftUI
struct SmapleView: View {
let font = Font.custom("HiraginoSans-W3", size: 50)
let borderColor = Color(.systemBlue)
var body: some View {
HStack(spacing: 10) {
Text("Copy")
.font(font)
.frame(height: 60)
.border(borderColor)
Text("Copy")
.font(font)
.border(borderColor)
.frame(height: 60)
.border(borderColor)
}
}
}
struct SmapleView_Previews: PreviewProvider {
static var previews: some View {
SmapleView()
}
}
@Koze
Copy link
Author

Koze commented May 8, 2020

Screenshot 2020-05-09 1 29 02

@Koze
Copy link
Author

Koze commented May 8, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment