Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

^FT Field Typeset is not handled correctly for default x & y values. #252

Open
danzk opened this issue Jun 17, 2024 · 1 comment
Open

^FT Field Typeset is not handled correctly for default x & y values. #252

danzk opened this issue Jun 17, 2024 · 1 comment
Assignees

Comments

@danzk
Copy link
Contributor

danzk commented Jun 17, 2024

I noticed that the ^FT command is not rendered correctly when x & y are not specified.
It should follow on from the end position of the last field.
You can see the following ZPL is rendered correctly on labelary.com.

^XA
^FT50,50^A0N,50,50^FDText Box^FS
^FT^A0R,50,50^FDText Box^FS
^FT^A0I,50,50^FDText Box^FS
^FT^A0B,50,50^FDText Box^FS
^XZ

image

@primo-ppcg primo-ppcg self-assigned this Jun 18, 2024
@primo-ppcg
Copy link
Collaborator

This is relatively significant change, which is not simple to achieve with the current analyze-then-draw paradigm.

I think the following would be required:

  1. The VirtualPrinter will need to keep track of the last drawn position. Every ElementDrawer will need to be responsible for updating this.
  2. PositionX and PositionY of ZplPositionedElementBase will likely need to be nullable. Every Drawer and Renderer will need to be updated to accomodate this. In particular, using (0, 0) as defaults if ^FO is in effect, or (LastDrawnPosition.X, LastDrawPosition.Y) under ^FT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants