[GH-ISSUE #285] Feature request: Add 'alignment' for "textbox" of Json template #1270

Closed
opened 2026-03-20 19:06:31 +01:00 by sascha_hemi · 3 comments
Owner

Originally created by @LeftPinkie on GitHub (Apr 6, 2024).
Original GitHub issue: https://github.com/OpenEPaperLink/OpenEPaperLink/issues/285

Originally assigned to: @nlimper on GitHub.

In the Json template, please add "alignment" attribute to the "textbox" object like it has for "text". For example:

{ "textbox": [x, y, w, h, "text", "fontname" }
{ "textbox": [x, y, w, h, "text", "fontname", color ] }
{ "textbox": [x, y, w, h, "text", "fontname", color, line height] }
{ "textbox": [x, y, w, h, "text", "fontname", color, line height, alignment] }
Originally created by @LeftPinkie on GitHub (Apr 6, 2024). Original GitHub issue: https://github.com/OpenEPaperLink/OpenEPaperLink/issues/285 Originally assigned to: @nlimper on GitHub. In the Json template, please add "alignment" attribute to the "textbox" object like it has for "text". For example: ``` { "textbox": [x, y, w, h, "text", "fontname" } { "textbox": [x, y, w, h, "text", "fontname", color ] } { "textbox": [x, y, w, h, "text", "fontname", color, line height] } { "textbox": [x, y, w, h, "text", "fontname", color, line height, alignment] } ```
sascha_hemi added the enhancement label 2026-03-20 19:06:31 +01:00
Author
Owner

@nlimper commented on GitHub (Nov 3, 2024):

What's your usecase? IMHO, a paragraph text should (almost) always be left aligned.
For headlines etc, you can use "text" which can be left/center/right alinged.

<!-- gh-comment-id:2453404018 --> @nlimper commented on GitHub (Nov 3, 2024): What's your usecase? IMHO, a paragraph text should (almost) always be left aligned. For headlines etc, you can use "text" which can be left/center/right alinged.
Author
Owner

@LeftPinkie commented on GitHub (Nov 3, 2024):

If I have a multi-line description, I would like to have it wrap and align center or right.

<!-- gh-comment-id:2453497274 --> @LeftPinkie commented on GitHub (Nov 3, 2024): If I have a multi-line description, I would like to have it wrap and align center or right.
Author
Owner

@nlimper commented on GitHub (Dec 10, 2024):

Done! (in 30812dff49)
{ "textbox": [x, y, w, h, "text", "fontname", color, line height, alignment] }
0: left, 1: center, 2: right

<!-- gh-comment-id:2533037825 --> @nlimper commented on GitHub (Dec 10, 2024): Done! (in https://github.com/OpenEPaperLink/OpenEPaperLink/commit/30812dff49621fc0a39c7fba8fffef922bbe345b) `{ "textbox": [x, y, w, h, "text", "fontname", color, line height, alignment] }` 0: left, 1: center, 2: right
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/OpenEPaperLink#1270