TextDirection
Text direction modes for reading order computation.
from nutrient import TextDirectionValues
| Name | Value | Description |
|---|---|---|
TextDirection.LEFT_TO_RIGHT_TOP_TO_BOTTOM | 0 | Left-to-right, then top-to-bottom (e.g., English, most European languages) |
TextDirection.RIGHT_TO_LEFT_TOP_TO_BOTTOM | 1 | Right-to-left, then top-to-bottom (e.g., Arabic, Hebrew) |
TextDirection.TOP_TO_BOTTOM_RIGHT_TO_LEFT | 2 | Top-to-bottom, then right-to-left (e.g., Traditional Chinese, Japanese vertical) |
TextDirection.TOP_TO_BOTTOM_LEFT_TO_RIGHT | 3 | Top-to-bottom, then left-to-right (e.g., Mongolian vertical) |
Usage Example
from nutrient import TextDirection
# Access enum valuesvalue = TextDirection.LEFT_TO_RIGHT_TOP_TO_BOTTOMprint(f"Value: {value}") # Output: Value: TextDirection.LEFT_TO_RIGHT_TOP_TO_BOTTOMprint(f"Integer value: {value.value}") # Output: Integer value: 0