Skip to content

Instantly share code, notes, and snippets.

@Koze
Last active May 8, 2020 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Koze/6a987981ae2d68a1d71d9d21cf77b0e6 to your computer and use it in GitHub Desktop.
Save Koze/6a987981ae2d68a1d71d9d21cf77b0e6 to your computer and use it in GitHub Desktop.
Japanese font without Japanese character causes the clip at the bottom.
import SwiftUI
struct SmapleView: View {
let font = Font.custom("HiraginoSans-W3", size: 50)
let borderColor = Color(.systemBlue)
var body: some View {
VStack(spacing: 10) {
Text("Copy")
.font(font)
.border(borderColor)
Text("コピー Copy")
.font(font)
.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 11 53

@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