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
⭐️ 1
🕓 1 year 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: 1
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Initial release
1 year ago

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