FontPicker
FontPicker on macOS
Install / Use
/learn @tyagishi/FontPickerREADME
FontPicker
Wrapped NSFontPanel for SwiftUI.
UI

for working example, please refer to https://github.com/tyagishi/FontPickerExample
example code
FontPicker can be used like ColorPicker.
struct ContentView: View {
@State private var font: NSFont = NSFont.systemFont(ofSize: 24)
var body: some View {
VStack {
FontPicker("Font", selection: $font)
Text("selected font name \(font.displayName ?? "no font" )")
Text("font size: \(font.pointSize, specifier: "%.0f")")
}
}
}
small improvement
As usual user can close FontPanel with close button of FontPanel. Additionally: user can close FontPanel with second clicking FontPicker button. (i.e. Clicking FontPicker button while FontPanel is still open FontPanel will be closed.)
comments are welcome
Comments, advice for improvements are highly appreciated. please contact to https://twitter.com/tyagishi .
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
