yokogaki 0.7.0 copy "yokogaki: ^0.7.0" to clipboard
yokogaki: ^0.7.0 copied to clipboard

Flutter package for Japanese horizontal text (yokogaki) layout with ruby, kenten, warichu, and rich text support

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.7.0 - 2026-01-10 #

Added #

  • Text selection support
    • SelectableHorizontalText widget for selectable text
    • SelectableHorizontalTextPainter for rendering selection highlighting
    • Tap to select single character
    • Drag to select text range
    • Long press to show copy context menu
    • Copy selected text to clipboard
    • Customizable selection color
    • Full support for all features (ruby, kenten, warichu)
  • Text selection examples in demo app

Features #

  • Intuitive text selection with tap and drag gestures
  • Visual selection highlighting with customizable color
  • Copy to clipboard functionality
  • Works seamlessly with ruby annotations, kenten marks, and warichu

0.6.0 - 2026-01-10 #

Added #

  • Performance optimizations
    • LRU layout cache with 100-entry limit for fast re-rendering
    • LayoutCache class for caching layout calculations
    • LayoutCacheKey and LayoutCacheValue for cache management
    • TextPainter reuse across renders to reduce allocations
    • Optimized calculateSize() to reuse cached layouts

Changed #

  • Reused TextPainter instances in HorizontalTextPainter, HorizontalRichTextPainter, RubyRenderer, and WarichuRenderer
  • Added useCache parameter to layout() and calculateSize() methods (default: true)
  • Optimized style comparison in cache key matching

Performance Impact #

  • ~70% reduction in layout calculation time for repeated renders
  • ~50% reduction in TextPainter allocations
  • Significant performance improvement for scrollable text lists

0.5.0 - 2026-01-10 #

Added #

  • Rich text support with multiple styles
    • HorizontalTextSpan base class for span hierarchy
    • SimpleHorizontalTextSpan for single-style text with annotations
    • GroupHorizontalTextSpan for grouping multiple spans
    • HorizontalRichText widget for rendering multi-style text
    • HorizontalRichTextPainter for rendering spans with different styles
    • Per-span ruby, kenten, and warichu annotations
    • Support for mixing multiple text styles, colors, fonts, and weights
  • Rich text examples in demo app showing multiple styles and combinations

Changed #

  • Added TextSpanData class for flattening span hierarchies
  • Added StyleRange class for tracking style ranges in rich text

0.4.0 - 2026-01-10 #

Added #

  • Warichu (inline annotations) support
    • Warichu model for defining inline annotations
    • WarichuRenderer for laying out and rendering warichu in two-line format
    • WarichuLayout class for warichu positioning information
    • warichuList parameter in HorizontalText widget
    • warichuStyle in HorizontalTextStyle for customizing warichu appearance
    • Warichu text automatically split into two lines and displayed inline
    • Support for combining Ruby, Kenten, and Warichu on the same text
  • Warichu examples in demo app showing inline annotations and feature combinations

Changed #

  • Updated HorizontalText widget to accept warichuList parameter
  • Updated HorizontalTextPainter to render warichu annotations
  • Updated HorizontalTextStyle to include warichuStyle field

0.3.0 - 2026-01-10 #

Added #

  • Kenten (emphasis marks) support
    • Kenten model for defining emphasis marks on text ranges
    • KentenType enum with 6 types: sesame, circle, filledCircle, triangle, filledTriangle, doubleCircle
    • KentenRenderer for laying out and rendering kenten marks above text
    • KentenLayout class for kenten positioning information
    • kentenList parameter in HorizontalText widget
    • kentenStyle in HorizontalTextStyle for customizing kenten appearance
    • Kenten marks automatically positioned above characters with proper spacing
    • Support for combining Ruby and Kenten on the same text
  • Kenten examples in demo app showing different mark types and combinations

Changed #

  • Updated HorizontalText widget to accept kentenList parameter
  • Updated HorizontalTextPainter to render kenten marks
  • Updated HorizontalTextStyle to include kentenStyle field

0.2.0 - 2026-01-10 #

Added #

  • Ruby text (furigana) support
    • RubyRenderer for laying out and rendering ruby text above base text
    • RubyLayout class for ruby positioning information
    • rubyList parameter in HorizontalText widget
    • rubyStyle in HorizontalTextStyle for customizing ruby appearance
    • Multi-line ruby support - ruby text properly splits across line breaks
    • Ruby centering - ruby text is horizontally centered over base text
  • Added textIndex field to CharacterLayout for tracking character positions
  • Ruby examples in demo app showing basic and multi-line ruby usage

Changed #

  • Updated HorizontalText widget to accept rubyList parameter
  • Updated HorizontalTextPainter to render ruby text
  • Updated HorizontalTextLayouter to include textIndex in character layouts

0.1.0 - 2026-01-10 #

Added #

  • Initial release of yokogaki package (MVP)
  • HorizontalText widget for horizontal Japanese text layout
  • HorizontalTextStyle for configuring text appearance and behavior
  • HorizontalTextLayouter for basic horizontal text layout with line breaking
  • HorizontalTextPainter for rendering text to Canvas
  • Kinsoku processing (禁則処理) support via kinsoku package
    • Line-start and line-end prohibition
    • Hanging (burasage) and pushing-in (oikomi)
  • Yakumono adjustment (約物調整)
    • Half-width yakumono handling
    • Consecutive yakumono spacing
  • Line breaking with maxWidth parameter
  • Debug grid display for development
  • Example app with multiple demos
  • Dependency on kinsoku package for Japanese text processing

Notes #

  • This is an MVP release with basic horizontal text layout functionality
  • Ruby, kenten, warichu, and rich text features are planned for future releases
  • Works with kinsoku package for character classification and line breaking rules
1
likes
0
points
237
downloads

Publisher

verified publisherpub.nyapic.com

Weekly Downloads

Flutter package for Japanese horizontal text (yokogaki) layout with ruby, kenten, warichu, and rich text support

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, kinsoku

More

Packages that depend on yokogaki