mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
Type: Optical Margin Alignment hangs punctuation in right-to-left paragraphs
Optical Margin Alignment and Roman Hanging Punctuation left every right-to-left paragraph of point and area type, and type on a path whose first paragraph runs right to left, as it was: the quotation marks, full stops and commas at the ends of its lines stayed inside the margins. A right-to-left line now hangs at the margins its alignment places it against, as a left-to-right line does. Auto aligns a right-to-left line at its right, so it hangs there. The line is read from right to left: where it hangs at its left margin, a full stop and the quotation mark after it that end the line hang together. In vertical type, where the characters of a right-to-left paragraph run from the top down, the pair is read from the top. Type on a path whose first paragraph runs right to left hangs at its brackets by the same rule. In horizontal type, Auto places it at the end bracket, so it hangs there. On a closed path, its hang at the end bracket gets the space between the end and start brackets before its hang at the start bracket does, as in right-aligned type. A justified right-to-left line of one word is spread between its letters as they are drawn. The gap after each letter went to the letter that follows it in the text, so the two leftmost letters touched and the word ended one gap short of the right margin. Docs: docs/mcp.md, docs/type-parity.md, docs/target-app-parity.md.
This commit is contained in:
+15
-13
@@ -3898,21 +3898,24 @@ for the selected type objects (or `ids`); without `on` it sets the opposite of t
|
||||
on. Optical Margin Alignment is a setting of the whole thread: the command sets every frame of a selected frame's
|
||||
thread, and `ids` lists them all. Threading frames gives the thread its first frame's setting, frames taken out of
|
||||
a thread keep it, and a file whose frames of one thread differ opens with the first frame's setting in all of them.
|
||||
In every left-to-right paragraph of point and area type, these characters hang outside the margin when they
|
||||
In every paragraph of point and area type, these characters hang outside the margin when they
|
||||
start or end a line: quotation marks, hyphens (a hyphenated line's hyphen too), full stops and commas hang wholly;
|
||||
asterisks, tildes, ellipses, en and em dashes, colons and semicolons hang by half their width; and A, V, W, Y, v, w
|
||||
and y hang by a tenth of theirs. A punctuation mark followed by a quotation mark hangs with it.
|
||||
Left-aligned lines hang at their left margin, right-aligned lines hang at their right margin, and centered and
|
||||
justified lines hang at both. In vertical type the margins are the top and bottom of a column. The space that
|
||||
justification adds between glyphs leaves out the gaps next to a hanging punctuation mark. Lines break where they did
|
||||
justified lines hang at both. Auto aligns a right-to-left line at its right. A right-to-left line is read from right
|
||||
to left: where it hangs at its left margin, `."` ending it hangs both glyphs. In vertical type the margins are the
|
||||
top and bottom of a column. The space that justification adds between glyphs leaves out the gaps next to a
|
||||
hanging punctuation mark. Lines break where they did
|
||||
without it, and a line of one glyph does not hang. East Asian commas and full stops hang only through burasagari, and
|
||||
a line that ends in one hangs only at its start. Type on a path hangs at its brackets, measured along the path:
|
||||
left-aligned, Auto, Justify All and Justify with Last Line Aligned Left type hangs at the start bracket, right-aligned
|
||||
and Justify with Last Line Aligned Right type hangs at the end bracket, and centered and Justify with Last Line Aligned
|
||||
Center type hangs at both. Glyphs that hang past the end bracket do not make the type overflow. On an open path a
|
||||
hang stops at the path's end, and on a closed path the two hangs together take at most the stretch between the end
|
||||
and start brackets. SVG export writes type on a path whose glyphs hang as outlines, with a warning. Type on a path
|
||||
whose first paragraph runs right to left, and right-to-left paragraphs of point and area type, are laid out as before.
|
||||
left-aligned, Justify All and Justify with Last Line Aligned Left type hangs at the start bracket, right-aligned and
|
||||
Justify with Last Line Aligned Right type hangs at the end bracket, and centered and Justify with Last Line Aligned
|
||||
Center type hangs at both. Auto type hangs at the bracket it is placed at: the end bracket for horizontal type whose
|
||||
first paragraph runs right to left, and the start bracket otherwise. Glyphs that hang past the end bracket do not make
|
||||
the type overflow. On an open path a hang stops at the path's end, and on a closed path the two hangs together take
|
||||
at most the stretch between the end and start brackets. SVG export writes type on a path whose glyphs hang as
|
||||
outlines, with a warning.
|
||||
New type and documents from before it have it off, and it is saved only when on. One undo step.
|
||||
|
||||
```json
|
||||
@@ -3928,10 +3931,9 @@ hyphens, full stops and commas wholly; asterisks, tildes, ellipses, en and em da
|
||||
on the same sides (left-aligned lines at their left, right-aligned at their right, centered and justified at both), and
|
||||
letters don't hang. With Optical Margin Alignment on as well, the letters hang too. East Asian punctuation hangs only
|
||||
through burasagari. When the first paragraph of type on a path has Roman Hanging Punctuation on, the type hangs its
|
||||
punctuation at its brackets as Optical Margin Alignment does, and no letters. Type on a path whose first paragraph runs
|
||||
right to left, and right-to-left paragraphs of point and area type, are laid out as before. Off by default, saved with
|
||||
the paragraph (`roman_hanging` in `para`) only when on, carried by paragraph styles, and turned off by Reset Panel.
|
||||
One undo step. The menu item is checked while the paragraph the Paragraph panel shows has it on.
|
||||
punctuation at its brackets as Optical Margin Alignment does, and no letters. Off by default, saved with the paragraph
|
||||
(`roman_hanging` in `para`) only when on, carried by paragraph styles, and turned off by Reset Panel. One undo step.
|
||||
The menu item is checked while the paragraph the Paragraph panel shows has it on.
|
||||
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"text.setFormat","params":{"romanHangingPunctuation":true}}}
|
||||
|
||||
@@ -673,6 +673,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
With Optical Margin Alignment on, or Roman Hanging Punctuation on in the first paragraph, the glyphs at the ends of left-to-right type on a path hang outside its brackets, measured along the path. The type hangs at the start bracket when its line is placed there, hangs at the end bracket when the line is placed there, and hangs at both when it is centered. Glyphs that hang past the end bracket do not make the type overflow, and a hang stops at an open path's end. SVG export writes such type as outlines.
|
||||
The frames of threaded text share one Optical Margin Alignment setting: turning it on or off in one frame sets it in every frame, threading frames gives the thread its first frame's setting, and frames taken out of a thread keep it.
|
||||
Type › Optical Margin Alignment (`type.opticalMarginAlignment`) hangs the punctuation and letter edges at the ends of a type object's lines outside its margins: at the left of left-aligned lines, at the right of right-aligned lines, and at both ends of centered and justified lines, in point and area type of left-to-right paragraphs. Quotation marks, hyphens, full stops and commas hang wholly; asterisks, tildes, ellipses, en and em dashes, colons and semicolons hang by half; and A, V, W, Y, v, w and y hang by a tenth of their width. It is off by default and saved with the type object.
|
||||
Optical Margin Alignment and Roman Hanging Punctuation hang right-to-left paragraphs of point and area type, and type on a path whose first paragraph runs right to left, too. Auto aligns a right-to-left line at its right, or at the end bracket of a path, so it hangs there. A right-to-left line is read from right to left: where it hangs at its left margin, `."` ending it hangs both glyphs.
|
||||
The Paragraph panel menu's Hyphenation… (`ui.hyphenation`, `text.setFormat {wordsLongerThan, afterFirst, beforeLast, hyphenLimit, hyphenationZone, hyphenateCapitalized}`) sets each paragraph's hyphenation limits: the shortest word that breaks, the fewest letters on each side of the hyphen, the most hyphenated lines in a row, a zone at the right edge where the Single-line Composer breaks before a word instead of hyphenating it, and whether capitalized words break. The defaults are words longer than 5 letters, 3 letters on each side, no limit or zone, and capitalized words hyphenated; paragraph styles and the native file keep the options.
|
||||
The Paragraph panel's Insert Kashidas (with the Indic options; `text.setFormat {kashida}`) lengthens each Arabic word of a justified horizontal area type line with a kashida, a tatweel between its last pair of joined letters, before the word spaces widen: Short, Medium and Long kashidas are at most a quarter, half and a whole em long, Stylistic ones are whole tatweels up to an em, and None (the default) leaves the line as before; paragraph styles and the native file keep the setting.
|
||||
In vertical type, the Tabs panel names its alignment buttons Top-Justified Tab, Center-Justified Tab, Bottom-Justified Tab and Decimal-Justified Tab, in their tool tips and for screen readers, and labels the position field Y. In horizontal type the buttons keep the names Left-Justified Tab and Right-Justified Tab, and the field keeps the label X.
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ against Illustrator's public documentation; **estimated** unless noted.
|
||||
| Fallback glyphs keep the text's weight and slant | done | #2491: a character from a fallback face is set in that family's face nearest the run's weight and slant; Bold Italic of a missing family is drawn Bold (Source Sans 3 has no Bold Italic) rather than Italic |
|
||||
| Colour fonts (OpenType SVG / COLR) | partial | |
|
||||
| Every-line and Single-line composers | done | tuned by eye, never compared side by side |
|
||||
| Optical Margin Alignment | done | Type › Optical Margin Alignment, `type.opticalMarginAlignment`: per type object, with one setting for all the frames of a thread, in point and area type of left-to-right paragraphs, and at the brackets of type on a path whose first paragraph runs left to right; right-to-left paragraphs of point and area type, and type on a path whose first paragraph runs right to left, do not hang |
|
||||
| Optical Margin Alignment | done | Type › Optical Margin Alignment, `type.opticalMarginAlignment`: per type object, with one setting for all the frames of a thread, in point and area type of left-to-right and right-to-left paragraphs, and at the brackets of type on a path |
|
||||
| Roman Hanging Punctuation | done | Paragraph panel menu › Roman Hanging Punctuation, `text.setFormat {romanHangingPunctuation}` (#2756): per paragraph, Optical Margin Alignment's punctuation and amounts without the letters; paragraph styles carry it. Evidence: `tests::roman_hanging_punctuation_hangs_punctuation_but_not_letters`, `typecmd::area_tests::roman_hanging_punctuation_is_set_per_paragraph_and_saved_only_when_on` |
|
||||
| Hyphenation… and Justification… options | done | Hyphenation… (`ui.hyphenation`, `text.setFormat`) sets each paragraph's Words Longer Than, After First, Before Last, Hyphen Limit, Hyphenation Zone (Single-line Composer only) and Hyphenate Capitalized Words, and paragraph styles carry them (#2310). Justification… (`ui.justification`, `text.setFormat`, #2755) sets Word Spacing, Letter Spacing and Glyph Scaling (Minimum, Desired, Maximum), Auto Leading and Single Word Justification; Desired applies to every line, justified lines and the Every-line Composer use the ranges. Vertical type isn't glyph scaled; type on a path doesn't use them. Evidence: `crates/text/src/tests_justify.rs`, `dialogs::justification::tests` |
|
||||
| Tab stops and leaders; Tabs panel | partial | Tabs panel and stops with leaders in the model (`text.tabs.set`); a stop drags from where the press landed (#1458); leaders fill the tab's gap, repeated on a grid so they line up from line to line (#1877) |
|
||||
|
||||
Reference in New Issue
Block a user