Swiftpack.co - swiftty/JapaneseAttributesKit as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by swiftty.
swiftty/JapaneseAttributesKit 0.0.1
AttributedString extensions for vertical text styling
⭐️ 0
🕓 3 weeks ago
iOS macOS
.package(url: "https://github.com/swiftty/JapaneseAttributesKit.git", from: "0.0.1")

JapaneseAttributesKit

AttributedString extensions for vertical text styling.

Installation

Swift Package Manager

dependencies: [
    .package(url: "https://github.com/swiftty/JapaneseAttributesKit", from: "0.0.1")
]

Usage

by code.

import Foundation
import JapaneseAttributesKit

var string = AttributedString("あのイーハトーヴォのすきとおった")
string += {
    var string = AttributedString("風")
    string.ruby = .init(text: "かぜ")
    return string
}()
string.verticalGlyph = true

by markdown.

import Foundation
import JapaneseAttributesKit

var string = try AttributedString(markdown: "あのイーハトーヴォのすきとおった^[風](https://raw.github.com/swiftty/JapaneseAttributesKit/main/ruby: 'かぜ')", including: \.japanese)
string.verticalGlyph = true

License

JapaneseAttributesKit is available under the MIT license, and uses source code from open source projects. See the [LICENSE](https://github.com/swiftty/JapaneseAttributesKit/blob/main/LICENSE) file for more info.

GitHub

link
Stars: 0
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Initial release
3 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics