Text direction modes for reading order computation.

from nutrient import TextDirection

Values

NameValueDescription
TextDirection.LEFT_TO_RIGHT_TOP_TO_BOTTOM0Left-to-right, then top-to-bottom (e.g., English, most European languages)
TextDirection.RIGHT_TO_LEFT_TOP_TO_BOTTOM1Right-to-left, then top-to-bottom (e.g., Arabic, Hebrew)
TextDirection.TOP_TO_BOTTOM_RIGHT_TO_LEFT2Top-to-bottom, then right-to-left (e.g., Traditional Chinese, Japanese vertical)
TextDirection.TOP_TO_BOTTOM_LEFT_TO_RIGHT3Top-to-bottom, then left-to-right (e.g., Mongolian vertical)

Usage Example

from nutrient import TextDirection
# Access enum values
value = TextDirection.LEFT_TO_RIGHT_TOP_TO_BOTTOM
print(f"Value: {value}") # Output: Value: TextDirection.LEFT_TO_RIGHT_TOP_TO_BOTTOM
print(f"Integer value: {value.value}") # Output: Integer value: 0