[GH-ISSUE #97] X Y Coordination "Center" specification in template #1150

Closed
opened 2026-03-20 19:05:12 +01:00 by sascha_hemi · 4 comments
Owner

Originally created by @Draexl on GitHub (Aug 4, 2023).
Original GitHub issue: https://github.com/OpenEPaperLink/OpenEPaperLink/issues/97

Json template:
It would be great if it were possible to specify the X Y coordinates as the center. So that the alignment remains the same for different long texts.

Originally created by @Draexl on GitHub (Aug 4, 2023). Original GitHub issue: https://github.com/OpenEPaperLink/OpenEPaperLink/issues/97 Json template: It would be great if it were possible to specify the X Y coordinates as the center. So that the alignment remains the same for different long texts.
sascha_hemi added the enhancement label 2026-03-20 19:05:12 +01:00
Author
Owner

@nlimper commented on GitHub (Aug 4, 2023):

you can already add the horizontal alignment in the last parameter of the text:
{ "text": [x, y, "text", "fontname", color, alignment] }
0: left, 1: center, 2: right
Vertical alignment is always 'top', as the baseline of a font is not always the same, and the perceptual center of gravity of a line of text is not always in the middle.

<!-- gh-comment-id:1666116013 --> @nlimper commented on GitHub (Aug 4, 2023): you can already add the horizontal alignment in the last parameter of the text: `{ "text": [x, y, "text", "fontname", color, alignment] }` 0: left, 1: center, 2: right Vertical alignment is always 'top', as the baseline of a font is not always the same, and the perceptual center of gravity of a line of text is not always in the middle.
Author
Owner

@Draexl commented on GitHub (Aug 4, 2023):

Thanks for the Info. But with die Small Letter e.g. t0_14b_tf is center not possible

<!-- gh-comment-id:1666218546 --> @Draexl commented on GitHub (Aug 4, 2023): Thanks for the Info. But with die Small Letter e.g. t0_14b_tf is center not possible
Author
Owner

@nlimper commented on GitHub (Aug 5, 2023):

ah, I see. I will add it soon!

<!-- gh-comment-id:1666287786 --> @nlimper commented on GitHub (Aug 5, 2023): ah, I see. I will add it soon!
Author
Owner

@nlimper commented on GitHub (Aug 5, 2023):

Thanks for noticing. Fixed in the next commit.

<!-- gh-comment-id:1666571559 --> @nlimper commented on GitHub (Aug 5, 2023): Thanks for noticing. Fixed in the next commit.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/OpenEPaperLink#1150