A filter over `currentfile` waits until it is first read, and it took
its data from whichever file was running by then. One made over the
program's own file and first read inside a file run with `cvx exec`
read that file instead, and one made over a file being run, first read
in a file that one runs, read the inner file. The pending stream now
records the file it was made over (a chained filter inherits it), and
`materialize` decodes from that file.
A file run with `cvx exec` was read whole and run as a separate
program, while `currentfile` stayed the outer EPS. The PLRM has
`currentfile` return the topmost file being run, positioned after the
last token read. Ghostscript's eps2write runs each page's content and
each Type 3 glyph from a SubFileDecode filter, and its `ID` reads the
inline image's samples through `currentfile`, so they were read from
the outer file and then ran as program.
A file being run is now read object by object from its own data, and
while it runs it is `currentfile`. A filter made over it waits to
read, as one over the program's own file does, so it starts where the
program is when the filter is first read.
`known` raised a typecheck for any key that can't be a key here (an
array, a dictionary, a real with a fraction). The PLRM allows any
object but null as a key, and since `put` refuses such keys, no
dictionary holds one: `known` now answers false, and null still raises
the typecheck. Ghostscript's eps2write prolog looks each inline-image
value up in a dictionary of abbreviations, and an image with two
filters has an array there.
The standard encodings were names in systemdict only, and the Encoding
category was empty, so `/StandardEncoding /Encoding findresource`
failed with undefinedresource. The PLRM (3rd ed.) has both as
instances of the Encoding category, the same arrays as the names.
Ghostscript's eps2write prolog takes StandardEncoding that way for a
font whose encoding is a Differences dictionary with no BaseEncoding,
so files with its Type 3 text stopped there.
An agent confined to automation roots could load the place cursor, with
file.place.queue or tool.setOption, and the files were placed later, by
a click of the person at the keyboard, outside any roots. tool.setOption
checked a queued path but not files given inline, whose linked files (an
SVG's referenced images) were then read with the keyboard user's
unrestricted access.
The session now keeps the automation roots in force when the cursor's
queue is loaded, and both the engine's own placement and the desktop
app's background placement read the queued file within them. A queue
loaded outside any roots places as before.
Reflow copied each listed frame's text into its thread's story, so a
document that listed one frame several times in a thread, or in several
threads, repeated that text in the story and wrote the grown story back
for the next thread to copy again, growing the text with every
repetition while the document opened. Reflow now keeps each frame at its
first place in the thread list only.
The filter that keeps brush pieces from drawing a brush again walked a
mask's art but never looked at the mask's root itself. A symbol instance
at the root of a mask, whose symbol draws a stroke with the brush, then
survived and re-entered the brush while the mask was rendered, without
end. The mask goes now, as such an instance goes among the children.
The gate failed kept_menu_names_are_menu_labels_left_in_english: sv is in
KEEPS_MENU_NAMES, so the MENU_KEEP_AS_IS names (VectorCraft, OpenType, the
workspace names, the perspective-grid presets) must stay in English. The
coverage report had listed them as missing; the 20 rows are removed so the
names fall back to English again. The two genuinely-missing strings
(Font Size:, digits Hindi) stay.
Co-authored-by: rahul05ranjan <11793455+rahul05ranjan@users.noreply.github.com>
The gate failed kept_menu_names_are_menu_labels_left_in_english: ru is in
KEEPS_MENU_NAMES, so the MENU_KEEP_AS_IS names (VectorCraft, OpenType, the
workspace names, the perspective-grid presets) must stay in English. The
coverage report had listed them as missing; the 20 rows are removed so the
names fall back to English again. The 110 genuinely-missing strings stay.
Co-authored-by: rahul05ranjan <11793455+rahul05ranjan@users.noreply.github.com>
`gcheck` and `scheck` answered false for every operand. The PLRM (3rd
ed., `gcheck`) says they are true for a simple object, and false only
for a composite one in local VM. The eps2write prolog copies its
initial graphics state into global VM and leaves a value alone only
when `gcheck` is true. So the integers in the `currenthalftone`
dictionary took the copy path, left the stack one item off, and the
next `put` failed with a typecheck in `cp2g`.
Simple objects now answer true. Composites still answer false, since
every composite here is in local VM.
Count nine-slice symbol art with clips off, as place_symbol_art_unclipped
places it, so art crossing the guides is not over-charged; add a test that
the flattening segment budget stops a path independently of the point
budget; format.
The table chain's records and entry names now have a whole-archive allowance, only the
first name of an id is decoded and kept (no clone into the entry map), and an entry's
size is charged before it is decompressed and stays charged when it fails, with the
failure remembered so a broken entry is not decompressed again.
Object::get scanned every field for each lookup, and a shared object is looked up again
on every visit. Objects with more than 16 fields now keep a sorted tag index (first and
last position), so get and get_last are binary searches with the same first/last-
occurrence results. Rectangle corner types and radii read at most the four entries that
can matter instead of converting the whole arrays.
Flattening a path for DXF capped the points it kept but kept flattening every remaining curve
after the cap, each curve at a fixed tolerance however large it was. Symbol instances placed
inside symbols were cloned and walked once per instance with only the nesting depth bounded, so
a small symbol graph of empty symbols could fan out into billions of visits that write nothing.
- Flatten through vectorcraft_geom::flatten (a bounded number of segments per curve) and stop
at the first curve past the point or segment budget.
- Charge each symbol instance's art to MAX_SYMBOL_NODES with charge_symbol_art before placing
it, as the document does elsewhere; once spent, no further instances are expanded.
A gradient whose stops are not strictly increasing (repeated offsets, or
a file's unsorted stops) sampled each Classic off-centre midpoint, and
each freeform point when recoloring, by scanning the stops from the
start, so many stops and points cost their product. Such stops now get
an index of the furthest offset reached so far, which never decreases,
and each sample finds the pair of stops sample() would pick by binary
search, giving the same colour for any order of offsets.
Making a brush or symbol library, and gathering the resources copied
art uses, found each referenced swatch, symbol, pattern, graphic style,
text style and brush by scanning all the definitions of its kind, and
checked library membership and panel order by scanning the lists again,
so a library or document of N definitions cost N squared comparisons.
Each kind is now indexed by name the first time a reference to it is
followed, and the library code looks names up in sets and maps built
once.
The file name pattern searched the rest of the pattern for a closing
bracket at every opening bracket, so a pattern of many unmatched brackets
took quadratic time to render, in the export and its live preview. A
token's name never holds a bracket, so the search now stops at the next
opening one.
Output naming tried -2, -3 and so on from the start for every file given
a taken name, so one name pattern over many artboards rebuilt and looked
up every number used before for each file. It now goes on from the last
number given for that name, and remembers which file got a name from it.
parse_range walked every index of every interval, so a range that names
the same pages many times ("1-,1-,1-,...") cost the number of parts
times the page count. Picked indices now link to the next unpicked one,
so each page is visited about once whatever the overlap.