discontinuedPackage kseg has been discontinued.

kseg library

Khmer Script Segmenter (kseg)

A Flutter package for detecting and styling different scripts within a string, with a focus on Khmer and Latin scripts.

This package enables developers to automatically identify Khmer and Latin script segments within text and apply different styles to each segment, ensuring proper typography and readability for mixed-script text.

Example usage:

Kseg(
  text: "តេស្តTest អក្សរខ្មែរ Latin script",
  khFont: "Battambang",
  latinFont: "Roboto",
  khFontSize: 18,
  latinFontSize: 16,
)

Classes

KhmerUnicodeRanges
Unicode range definitions for script detection in the kseg package.
Kseg
A widget that displays text with different styles for Khmer and Latin scripts.
LatinUnicodeRanges
Unicode ranges for Latin script.
ScriptDetectionResult
Result of script detection for a segment of text.
ScriptDetector
A detector for identifying scripts in text.
ScriptStyle
Style configuration for a specific script type.
ScriptStyleCollection
A collection of style configurations for different script types.
SegmentedString
A segmented string that contains multiple segments of different script types.
TextSegment
A segment represents a piece of text with a consistent script type.
TextSegmenter
A class to segment text into different scripts.
TextStyler
A class for styling segmented text.

Enums

ScriptType
Enum representing different script types that can be detected.