Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ export const RENDERING_FEATURES = {
spec: '§17.3.1.31',
},

// ─── RTL Paragraph ─────────────────────────────────────────────
// ─── Inline Direction ──────────────────────────────────────────
// Paragraph/run inline bidi handling. NOT table visual direction
// (w:bidiVisual, §17.4.1), NOT writing mode (w:textDirection,
// §17.3.1.41 paragraph / §17.4.72 cell; values in §17.18.93).
// @spec ECMA-376 §17.3.1.1 (bidi), §17.3.2.30 (rtl)
'w:bidi': {
feature: 'rtl-paragraph',
module: './rtl-paragraph',
feature: 'inline-direction',
module: './inline-direction',
handles: ['w:pPr/w:bidi', 'w:rPr/w:rtl'],
spec: '§17.3.1.1',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Inline Direction - rendering feature module
*
* Centralises paragraph base-direction and run-level RTL/bidi handling
* used by DomPainter:
* - Detecting whether a paragraph is RTL
* - Applying dir="rtl" and the correct text-align to an element
* - Resolving text-align for RTL vs LTR (justify -> right/left)
* - Deciding whether segment-based (absolute) positioning is safe
*
* Scope is paragraph/run inline bidi handling only. Table visual
* direction (w:bidiVisual, ECMA-376 §17.4.1) is a separate orthogonal
* axis owned by the painter's table rendering path. Writing mode
* (w:textDirection, ECMA-376 §17.3.1.41 paragraph / §17.4.72 cell;
* values in §17.18.93 ST_TextDirection) is another separate axis.
*
* @ooxml w:pPr/w:bidi - paragraph bidirectional flag
* @ooxml w:rPr/w:rtl - run-level right-to-left flag
* @spec ECMA-376 §17.3.1.1 (bidi), §17.3.2.30 (rtl)
*/

export { applyRtlStyles, shouldUseSegmentPositioning } from './rtl-styles.js';

This file was deleted.

2 changes: 1 addition & 1 deletion packages/layout-engine/painters/dom/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ import {
stampBetweenBorderDataset,
type BetweenBorderInfo,
} from './features/paragraph-borders/index.js';
import { applyRtlStyles, shouldUseSegmentPositioning } from './features/rtl-paragraph/index.js';
import { applyRtlStyles, shouldUseSegmentPositioning } from './features/inline-direction/index.js';
import { convertOmmlToMathml } from './features/math/index.js';

/**
Expand Down
Loading