Character and Properties panel tests enter leading through panel_harness::Panel.
The list test selects the preset and Auto options. The Reset Panel test invokes
ui.character.reset from the panel menu.
The params text and docs/mcp.md said the center stays when no reference point applies. With a center, the shape's center moves to the given point; the docs now name that case.
The white checks for colorized images in PDF export, EPS export and Print
Ink Fixes now go through DiscardWhite, which replaces
Document::spot_ink and Document::discards_white_overprint. Printed
separations read DiscardWhite with the spot inks they print, so a white
spot ink converted to process inks knocks out there.
Discard White Overprint knocked out every white fill, stroke and character
that was set to overprint, including a white linked to a spot swatch such as
an opaque white ink. A white linked to a solid spot swatch at a tint above 0%
is an ink of its own, so it now keeps overprinting; only paper white knocks
out, a 0% tint of a spot swatch included. The rule is in
vectorcraft_doc::overprint (DiscardWhite, is_paper_white) and is used by PDF
export, Overprint Preview, Separations Preview, printed separations, the fills
and strokes of composite print with Overprints set to Simulate, and Print Ink
Fixes' Remove White Overprint.
Overprint Preview and Separations Preview also draw overprinting paper white
characters knocking out while the option is on, as PDF export already wrote
them. EPS export keeps every overprint, as before.
* PDF import: keep embedded fonts for text whose family isn't installed
Glyphs drawn in an embedded font whose family isn't available are gathered
during import and built into one small TrueType font per family and style,
kept with the document (font/ttf blob). Text objects record the fonts and a
hash of their text: layout and rendering draw them in the kept font until the
text is edited (undo restores it) or the family is installed. Lines are
spaced against the file's own widths with per-glyph placement (#3756).
* PDF import: satisfy crate layering constraints without format dev-dep
* FileFont: negate us_win_descent in i32 to prevent overflow on extreme negative descenders
* PDF import: a kept font carries the file font's licence flags, and the docs say what that means
Review of #4569: the fsType of the file's font is copied to the font built from its glyphs (a test pins it against Embedding), so exports honour it; the docs state the limits, that the file's font program is not parsed, and that a saved file carries third-party glyphs.
* PDF import: a glyph curve far outside any glyph is left out; docs say what the limits and the font program mean
CodeRabbit on #4569: coordinates beyond 1e6 font units are refused before the curve is subdivided. The docs say the 64-font limit is what draws one type object and that the file's font program is read only for its licence flags and metrics.
* PDF import: two programs of one font keep the stricter licence flags; the docs cite their sources
CodeRabbit on #4569: embedded programs of one family and style share one built font, which kept the first program's fsType; it now takes the stricter of the two, whichever came first. The docs entry cites the Acrobat Help pages and the OpenType fsType specification.
* fmt
* PDF import: embedded fonts are on by default, with an opt-out preference
Owner decision on #4568. Preferences > File Handling > Use fonts embedded in imported PDFs (pdfImportEmbeddedFonts, on by default) and the embeddedFonts param of document.open and file.place: off, a PDF's type in a font the machine lacks is set in the fallback font with the missing-font warning, as before. One test each for on and off, one for the preference reaching the options.
* fmt after merging main
* docs: restore the status lines damaged by merges (main's line plus this PR's note)
* PDF import: set embedded_fonts through a builder method (keeps read_opened under the complexity limit)
* PDF import: move the missing-font notes out of read_opened (complexity limit after the merge)
* #4569: isolate file-font resources and reclaim live faces (UNVERIFIED)
* Preserve carried-font ownership across placement and recovery
* Fix carried-font regression test dependencies and unwind probe
* Use explicit OS2 heights in owned-font reference regression
* Keep native font regression artwork inside document layers
* fix(engine): bind file fonts when reading document profiles
* test(engine): initialize file-font leases in new image fixtures
* test: complete file-font lease initialization in image fixtures
* docs: keep the #4568 entry in the file-format parity status line
* fix(pdf): keep a line with another glyph for the same character as outlines (review)
A font kept with the document has one glyph per character. A glyph of the file's font that
differs from the one already kept for its character (a stylistic alternate that maps to the same
Unicode scalar) marks its line, which is imported as outlines so each glyph draws as the file
does.
* docs: resolve the leftover status-line conflict
* Placed document blob: give the new ImageBlob literal its file_font
* Test: a PDF's two glyphs for one character survive a native save and reopen as the file draws them
* Test: move the native save and reopen half of the two-glyphs regression to the engine (layers: no format dev-dep in pdf)
* Fix embedded-font preference help and English fallback checks
* Format embedded-font preference help with the workspace edition
---------
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: skylartaylor <hi@skylar.cc>
A grayscale or 1-bit image colorized with a fill color had no way to
overprint: object.setOverprint {fill: true} changed nothing, since an
image has no fill row. The color now carries its own overprint flag
(colorize_overprint in native files).
- object.setOverprint (fill, without item) and attributes.info set and
read it; Overprint Black and Print Ink Fixes' Remove White Overprint
treat the color as the image's fill.
- Overprint Preview, Separations Preview and printed separations show
the inks below the image where its color has none; on a plate the
color puts no ink on, the image is left out.
- PDF export draws the image in an overprinting graphics state, a
process color as an image of only the process inks it puts down.
- EPS export turns overprinting on for it, and now leaves white fills,
strokes and colorized images knocking out with Discard White
Overprint, as PDF export does.
- A legacy .ai file writes it as the image mask's fill overprint and
reads it back. Warped pieces, geometry-effect copies and flattening
keep or drop it as they do for fills.
- A white spot color is an ink: with Discard White Overprint it keeps
overprinting in PDF and EPS export and in both previews.
Docs: docs/mcp.md (Overprint, Print Ink Fixes), docs/target-app-parity.md.
- The searches for all the selected objects share one limit of
134,217,728 distances from a point to an edge, as Add Bounding Circle
shares its splits, and each cell is measured only when the limit has
room for it. One search keeps at most 1,048,576 cells waiting. The
pathops crate adds inscribed_circle_within for a shared budget.
- The search stops once its best center is within the precision of half
the box's narrower side, so a long rectangle ends at its first cells,
and cells that cannot beat the best center are no longer queued.
- A fill much smaller than the precision still gets a circle: the
search keeps splitting until it finds a center inside the outline.
- The precision also follows the box of the area the fill rule leaves.
- Flattening stops at the first curve past the edge limit. An outline
that flattening closes up, or whose center lands outside the curves,
is flattened up to four times, 16 times finer each time; one it still
cannot resolve is too complex to measure, not empty. Areas are summed
from each contour's own first point.
- An outline with more than 262,144 anchors in its filled subpaths is
refused before it is resolved.
- A selected layer is refused like any other object that is not a path,
and inside an isolated compound path the circles join it, as Tangent
Circle's do.
- The menu item uses a named constant, and a UI test checks that it
runs the command with no dialog and selects a new live circle in each
selected shape, as one undo step.
- The params text and docs say that the 0.02 pt bound holds before the
circle is drawn 0.03% smaller, that a shape under 10 pt across is
measured to a five-hundredth of its narrower side, when long curves
are flattened more coarsely, and that edges can move by 1e-6 pt as in
the other path operations.
Object › Plug-ins › Path Precision Tools › Add Inscribed Circle
(`addon.pathtools.inscribedCircle`) draws the largest live circle inside
each selected closed path or compound path, centered on its pole of
inaccessibility. Part of #6966.
- The outline is resolved under its fill rule into outer contours and
holes, so overlapping subpaths count as the area they fill and holes
bound the circle down to 1e-6 pt wide, the path operations'
resolution. Square cells are searched best
first, and the radius is measured from the center to the curves:
within 0.02 pt of the largest, or a thousandth of the narrower side
for a shape less than 10 pt across.
- The circle is drawn up to 0.03% smaller, by as much as its four curves
reach past a true circle, so it stays inside where it touches.
- Open paths, other objects, shapes that fill no area, and outlines past
262,144 flattened pieces or the search's work limit are errors that
leave the document unchanged. The first cells are sized to the work
limit.
- The circles get the current paint, go on top of the current layer or
the isolated group, and are one undo step.
- Docs: docs/mcp.md, docs/target-app-parity.md, docs/ui-parity.md,
ROADMAP.
With `reference`, `addon.pathtools.shape.set` measured the shape's box
before the edit with Use Preview Bounds and fell back to the geometric
box when the preview gave none, and it chose again after the edit. When
the preview gave a box before the edit and none after it, or the
reverse, the shape moved by the difference between two different boxes. The measure used before the
edit is now used after it.
The params text and docs/mcp.md now say that snapping to the pixel grid
and an attachment to a path apply after the reference point is kept,
as they do for the Transform panel's W and H. The docs line in
docs/target-app-parity.md changes only the lines it needs.
The tool gets an `addPoints` option (Add Points to Existing Paths in its
options, off to start). When it is on, drawing a circle also adds an
anchor point where the circle touches the first segment and the second
segment, splitting them without changing their shape. The anchors and
the circle are one undo step. A touch at an existing anchor adds none.
Alt held at the release turns the option the other way for that
circle, and a dot beside the pointer shows while it is in effect. When
a touched path was not selected, the selection is put back before the
circle is drawn, so Draw Behind places the circle behind the selected
objects.
The option label has a row in every complete catalog.
Part of #7178.
Block sets each character's leading to its size plus the frame's Line
Gap and fits the text again after every edit, so a leading set from the
Character panel, the Properties panel, the Type tool's Alt+arrow steps,
a character style, the Eyedropper or Text Tweaker was accepted and then
overwritten. On area type with Block on, a leading change now sets the
Line Gap to the new leading less the size of the first character
changed, within -1,296 to 1,296 pt, in the same undo step, and every
line spreads or tightens by the change. text.setStyle and
text.setRangeStyle take keepLineGap, which
Reset Panel sends, so a reset to Auto leading keeps the frame's Line
Gap. Point type, type on a path and area type with Block off keep their
own leading.
The Parametric Shape panel's W and H fields resized a shape about its
center whatever point the reference point locator showed, while the
Transform panel and the Control bar keep that point in place.
- addon.pathtools.shape.set takes `reference` (0 to 8; any other value
is an error). With it and no `center`, the point of the bounding box
that object.setBounds measures (rotated with rotated objects, and as
drawn with Use Preview Bounds) keeps its place. Without it the center
stays, as before.
- The panel's W and H pass the locator's point.
- A shape set by id and not selected that the edit would take past the
coordinate limit is refused, as object.setLiveShape refuses one.
- The result's `shape` is read back after the edit, and is null when
snapping to the pixel grid left a plain path.
Docs: docs/mcp.md, docs/target-app-parity.md.
History and Edit > Undo/Redo looked a step's label up in the catalog's
plain row first, so in catalogs where that row translates the Feather
arrowhead (cs, es, fi, fr, hu, id, ka, nl, pl, pt-br) a Feather effect
step was named after the arrowhead. Many other effects had a plain row
that differed from their menu row too (de Levels), and the Appearance
panel showed Inner Glow, Outer Glow, Film Grain and others in English
when the catalog had only the menu row.
- The engine records which built-in effect a step applied or edited:
HistoryEntry::effect(), set through Session::edit_effect around
effect.apply, effect.setParams (when every target edits the same
effect) and addon.color.filter, and kept through dialog previews,
undo and redo. A step another command names like an effect (Object >
Transform's Transform) and a step an undo group names keep none.
- i18n::effect_menu_label and effect_name give an effect's name from its
@id row or the row of its English menu label. The Effect menu, Last
Effect, History, Edit > Undo/Redo, the Appearance panel and its effect
picker, the effect dialog heading and the Effect Gallery use them.
- The untranslated-text report lists missing effect names.
The dialog keeps the lines it opened on as the command's ids, with the uid
of their document. OK changes those lines even when the selection changes
while the dialog is open, and changes nothing once another document is the
active one.
The split flap raster test now requires a flap at both samples: the right
flap at both, or the left flap's inner part at the near sample and its
outer part at the far one.
Set Fold Angle… (Object › Plug-ins › Packaging Tools) gives the selected
fold lines their own fold angle, from -180° to 180°, in place of their
role's 90° away from or toward the print, to the millionth of a degree;
reset: true takes it away. The angle is kept in the line's data under
vc-fold-angle, which native files and SVG with Preserve Editing keep and
plain SVG export leaves out of the path's attributes. A line keeps its
angle when it is given another role. The Fold Lines panel shows a Fold
Angle field for the selected lines it can change, empty when they
differ, and a Reset button.
- addon.packaging.setFoldAngle is one undo step, none when nothing
changes, and is dimmed while the selection holds no Crease, Partial Cut
or Perforation line that is neither locked nor hidden. An angle stored
as other text for the same number counts as unchanged.
- addon.packaging.roles also returns foldLines, foldAngle, ownAngles and
storedAngles for the lines Set Fold Angle can change, which are none
while nothing is selected.
- A hinge folds at the angle of the line with the most length in it,
counting a line the planar map splits into pieces whole and a line's
subpaths on top of each other once; among lines of equal length the
lowest id wins, in any line order. Before, it took the role of its
longest piece, so a hinge whose lines have different roles can now
fold the other way when a split line is the longer one.
- Fold Preview: a panel folded flat onto another (180°) is drawn behind
that panel's printed side, and at -180° in front of it; a flap folded
back over a folded panel lies between it and the panel before; a 0°
hinge keeps its panel level with its parent. Panels in one plane keep
their order when the panels they fold from are seen edge on, and a
panel that comes round onto another's plane lies on the side it came
from. Only panels in one plane stack by these rules; panels in
different planes go by depth, so folds a hair short of flat stay in
order wherever the blank lies in the document. The stack is worked out
from the blank's largest panel whichever panel the window folds about,
so a double-click on another panel moves the blank without changing
which panel shows. Panels that 90° folds bring into one plane, such as
a carton's closing flaps, now stack by these rules too.
- Set Fold Angle…'s dialog keeps the angle within -180° to 180° as it is
typed, as the panel's field does. Both show every decimal place the
angle has. ui.menuDialog opens the dialog for
addon.packaging.setFoldAngle, and gives the command's reason while
the selection holds no line it can change.
- Set Fold Angle skips a locked or hidden path of a compound path that is
named by id or selected without its compound. addon.packaging.setRole
(Make Cut Line and the other Make ... Line items) now skips it too;
before, it changed the whole compound.
- Folding: a hinge whose middle falls in a cutout turns its panel by the
side its parent lies on next to the hinge's own pieces, not by a point
anywhere inside the parent, which folded a panel the wrong way when
the parent also ran on past the hinge.
Docs: docs/mcp.md (Fold angles), ROADMAP.
Once a shape has used its 1,048,576 splits at any depth, Add Bounding Circle
still splits each further curve into up to 8 pieces, from a second budget of
7,340,032 splits shared among the shapes as the first one is. Only after
both are used up does a curve count whole by its control points' hull cut
down to its bounding box. Before, every curve past the first budget counted
whole, which can make the circle around a circle about 14% larger; with the
8 pieces the fit stays less than 0.3% larger.
- The comment on the shared budget no longer claims that the shape around
one object is independent of the other objects selected.
- shapes::enclosing_circle and convex_hull move below the star helpers.
- The "Each" label mapping in the dialog form sits after "Flip Cols".
- docs/mcp.md and docs/target-app-parity.md describe both budgets and the
size of the fit before the 0.01 pt is added.
Add Bounding Circle splits the curves of one command 1,048,576 times at
most in all, shared equally among the shapes with `each`. A piece that
still bends after the last split counts by the hull of its control points
cut down to its bounding box, so a large circle near the canvas edge keeps
a close radius.
- A path of a compound path selected on its own counts as an object, as
`object.transform` moves it, for both commands.
- A small loop whose ends meet gets a circle instead of being taken for a
single point.
- The smallest enclosing circle measures its radius from the center it
returns, after the move back from the first point, and does not copy
the hull to do so.
- The params text, docs/mcp.md and docs/target-app-parity.md describe the
limit and the compound path rule.
Add Bounding Rectangle and Add Bounding Circle refuse a selected object
of a symbol instance's art, so they are now dimmed while one is selected,
as other commands that refuse it are.
- The circle keeps only the hull's corners while it reads a path's
anchors too, so a path with very many anchors does not gather them all
first.
- The convex hull treats -0.0 and 0.0 as one coordinate, so points on a
vertical line at x = 0 give the line's two ends.
- docs/target-app-parity.md says that a curve is split into 1,024 pieces
at most, and a piece that still bends counts by its control points.
Add Bounding Rectangle… and Add Bounding Circle… open the command dialog
with Offset (0 to 4,000,000 pt), One per Object (`each`) and Preview, so
the menu sets what the commands take. Cancel removes the preview without
a step of history, and an Offset that takes the shape past the canvas
edge leaves the dialog open with the error.
- The canvas check reuses `sanity::rect_in_range`; the params text and
docs/mcp.md say the limit holds along each axis.
- Tests: the dialog (defaults, preview, Cancel, OK with and without an
Offset and One per Object, the canvas error, the catalog rows); a circle
just inside the limit; one edge past the limit is refused.
- Catalogs: the two menu labels with "…" and "One per Object" in all 28;
the four messages in bg, bs and id as well.
The dialog test for a point now compares the previewed lines' end points
across the External, Internal and All choices, confirms OK with each choice
and checks that the kept lines are the previewed ones, then undoes.
The params text, docs/mcp.md and the parity doc now say "at most" the
touching tolerance, matching the comparison in the code, and the parity doc
gives the tolerance's value.