Skip to content

Style from KnownStyle affects commands of the main document

I believe that the state of the main document is separate from the state of the commands in the SimpleStyle, based on the following snippet:

0.018402 0.075319 0.964385 0 1 0.878431 0.101961 Xa
<some paths>
/AI11Text :
1 /FreeUndo ,
0 /FrameIndex ,
1 /StoryIndex ,
2 /TextAntialiasing ,
;

9 () XW
U
9 () XW
%_/AI11Text :
%_0 /FreeUndo ,
%_0 /FrameIndex ,
%_1 /StoryIndex ,
%_2 /TextAntialiasing ,
%_;
%_
1 (Anon 2042) XW
1307 -620 m
1099 -620 L
1099 -540 L
1307 -540 L
1307 -620 L
f
1 An
u

The object after the texts is also yellow, but the current implementation assigns it a None fill.

From the code:

# (caveat): Fill/stroke might remain None for subsequent objects if not explicitly set

So here we clearly have a counterexample. I guess it make sense to register a new instance of the context manager for interpretation of the SimpleStyle.

Edited by Jonathan Neuhauser