mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-09 17:40:14 -06:00
Character Styles: Style Options sets Advanced Character Formats
Character Style Options and New Character Style get an Advanced Character Formats section with Horizontal Scale, Vertical Scale, Baseline Shift, Character Rotation and Language. Empty fields stay unset, an explicit 100%, 0 degrees or English: USA stays distinct from unset, and Reset Panel on the section clears only these five. Scales take 1% to 10000% and baseline shift -1296 pt to 1296 pt, as text.setRangeStyle does; rotation is stored from -180 to 180 degrees. Language sets the language the characters are shaped in; hyphenation and spelling do not change. A field still as it opened keeps its stored value without the range check, so a style captured from a scaled type object can be renamed. The same applies to Basic's Size and Leading minimum. charStyle.edit keeps a language tag that is not in the list when the style already has it, so a style read from a file with such a tag can be edited.
This commit is contained in:
+10
-4
@@ -5296,16 +5296,22 @@ Character Style Options uses `charStyle.edit {name, to, attrs}` to replace the n
|
||||
attribute map in one undo step. `to` is trimmed and must be unique. The command updates text using the style
|
||||
while preserving local overrides; Undo/Redo restores the definition and its users. The `charStyleOptions`
|
||||
dialog exposes `name`, `font_family`, `font_style`, `size`, `leading`, `kerning`, `tracking`, `case`,
|
||||
`position`, `underline`, `strikethrough`, `charAlign`, `section`, and `preview`. An empty field leaves its
|
||||
`position`, `underline`, `strikethrough`, `charAlign`, `h_scale`, `v_scale`, `baseline_shift`, `rotation`,
|
||||
`language`, `section` (`general`, `basic` or `advanced`), and `preview`. An empty field leaves its
|
||||
attribute unset. `leading` and `kerning` also accept `Auto` to store an explicit automatic value.
|
||||
Advanced Character Formats holds `h_scale` and `v_scale` (percent, 1 to 10000), `baseline_shift` (points,
|
||||
-1296 to 1296), `rotation` (degrees, stored from -180 to 180) and `language` (a name or tag from Document
|
||||
Setup's languages; English: USA stores the explicit default `null`, and a tag not in the list that the style
|
||||
already has is kept). Language sets the language the characters are shaped in; it does not change hyphenation
|
||||
or spelling.
|
||||
The New Character Style dialog accepts the same character fields and starts with the selected text's
|
||||
captured attributes. Without selected text, it starts with the character defaults for the interface language
|
||||
(including `charAlign: "emBoxCenter"` in Japanese); changing a Basic field keeps other seeded attributes.
|
||||
Without selected text, the New Paragraph Style dialog sends no `attrs`, and the engine gives the new style the
|
||||
paragraph defaults for the interface language. Reset Panel in Basic Character
|
||||
Formats removes those fields from the definition.
|
||||
`ui.charStyleOptions.resetPanel {}` performs that reset when Basic Character Formats is selected in
|
||||
either character-style dialog; it is disabled on General.
|
||||
Formats removes those fields from the definition, and Reset Panel in Advanced Character Formats removes its five.
|
||||
`ui.charStyleOptions.resetPanel {}` performs that reset for the section selected in either character-style
|
||||
dialog; it is disabled on General.
|
||||
|
||||
In the native file a text object's `para` holds the first paragraph's attributes and `paras` (left out when every
|
||||
paragraph is alike) one entry per paragraph, so older readers keep the first paragraph's. SVG export anchors each
|
||||
|
||||
@@ -502,6 +502,7 @@ since 2026-10-01.
|
||||
- **OpenType SVG colour fonts:** each glyph's SVG document is read by the SVG importer (registered by the engine) into vector art in the run's colours, then drawn, exported and outlined as COLR glyphs are; PDF real text writes them as text that draws nothing and draws their art where they sit. Measured by `tests_svg_glyphs`, `svg/tests/it/svg_glyphs.rs`, `tests_colourfonts::create_outlines_turns_svg_glyphs_into_groups`, `tests_colourfonts::pdf_real_text_draws_svg_glyphs_as_art_and_keeps_their_characters`. Scores unchanged (estimated).
|
||||
- **Character-style Auto leading:** capture and explicit style attributes retain Auto as a reset, distinct from omitted leading. Redefine and later numeric updates preserve local leading overrides; the Character Styles marker recognizes Auto correctly. Regression assertions cover partial definitions, Undo/Redo and native save/load serialization. Public references: [Character and paragraph styles](https://helpx.adobe.com/illustrator/using/character-paragraph-styles.html) and [Leading](https://helpx.adobe.com/illustrator/using/line-character-spacing.html).
|
||||
- **Character Style Options, General and Basic Character Formats:** the dialog edits a style's name and stored character formats together. Empty fields remain unset, checkboxes show an indeterminate unset state, Basic's Reset Panel clears its explicit settings, and Preview can be canceled without changing history. OK saves one undo step; New Character Style offers the same fields from captured text or the interface language's defaults without a selection. Public reference: [Character and paragraph styles](https://helpx.adobe.com/illustrator/using/character-paragraph-styles.html).
|
||||
- **Character Style Options, Advanced Character Formats:** Character Style Options and New Character Style set a style's Horizontal Scale and Vertical Scale (1% to 10000%), Baseline Shift (-1296 pt to 1296 pt), Character Rotation and Language; text that uses the style takes them and keeps its local overrides. Empty fields remain unset, an explicit 100%, 0° or English: USA stays distinct from unset, and the section's Reset Panel clears only these five. Language sets the language the characters are shaped in, not hyphenation or spelling. Public reference: [Character and paragraph styles](https://helpx.adobe.com/illustrator/using/character-paragraph-styles.html) ("Adjust the Horizontal and Vertical Scale, Baseline Shift, Character Rotation, and Language options").
|
||||
- **Text styles redefined to the defaults:** New and Redefine Character Style and Paragraph Style capture every attribute of the selected text, including those at their defaults (Auto kerning, Roman baseline alignment, the default Hyphenation options, the Every-line Composer, no tab stops), and `charStyle.setAttrs` and `paraStyle.setAttrs` keep an attribute set to its default value. After a redefinition, text whose value still equals the old definition's takes the new value, a default included; local overrides stay, and text that still has the old value of an attribute the new definition leaves out goes back to the Normal style's value. The style panels show "+" only where the text differs from its style, including type with Auto alignment. Public reference: [Character and paragraph styles](https://web.archive.org/web/20260825113735/https://helpx.adobe.com/illustrator/using/character-paragraph-styles.html).
|
||||
- **Text styles dragged onto the panel's buttons:** a style dragged from the Character Styles or Paragraph Styles panel onto Create New Style is copied (`charStyle.duplicate`, `paraStyle.duplicate`, which name the copy `<name> copy`) and the copy is highlighted; dragged onto Delete it is deleted (`charStyle.delete`, `paraStyle.delete`); the Normal style is not deleted. Each drop is one undo step. Public reference: [Character and paragraph styles](https://web.archive.org/web/20261015081534/https://helpx.adobe.com/illustrator/using/character-paragraph-styles.html).
|
||||
- **Auto Leading outside the layout:** a paragraph's Justification… › Auto Leading (<https://helpx.adobe.com/illustrator/desktop/design-with-text/edit-format-text/adjust-word-and-letterspacing-in-justified-text.html>) also sets the Leading the Character panel shows for Auto type (blank where the selected paragraphs differ), the leading the Alt+↑/↓ nudge (`type.step`) steps from, each paragraph's own, and the lines Fill with Placeholder Text counts in area type. Evidence: `ParaStyle::effective_leading` (`crates/doc/src/text.rs` test `paragraph_effective_leading_follows_auto_leading`), `tests_prefs::auto_leading_steps_and_fills_from_the_paragraph_auto_leading`, `panels::character` test `leading_field_shows_the_paragraph_auto_leading`.
|
||||
|
||||
Reference in New Issue
Block a user