Inkycal icon indicating copy to clipboard operation
Inkycal copied to clipboard

[Bug]: Vertical text alignment misaligned

Open pknee opened this issue 1 year ago • 2 comments

Describe the bug As already discussed in discord! The bottom (few) pixel(s) of the characters are cut off when using the modules

  • agenda
  • atom/rss feed

But not when using

To Reproduce Using epd_7_in_5_v3_colour setup ordered via tindie.com from ace

{
    "model": "epd_7_in_5_v3_colour",
    "update_interval": 10,
    "orientation": 0,
    "info_section": false,
    "info_section_height": 20,
    "border_around_modules": true,
    "modules": [
        {
            "position": 1,
            "name": "Weather",
            "config": {
                "size": [
                    528,
                    150
                ],
                "api_key": "asdfasdfasdf",
                "location": "123123123",
                "round_temperature": true,
                "round_windspeed": true,
                "forecast_interval": "daily",
                "units": "metric",
                "hour_format": "24",
                "use_beaufort": true,
                "padding_x": 0,
                "padding_y": 0,
                "fontsize": 15,
                "language": "de"
            }
        },
        {
            "position": 2,
            "name": "Agenda",
            "config": {
                "size": [
                    528,
                    300
                ],
                "ical_urls": "googlecalurls",
                "ical_files": null,
                "date_format": "ddd D MMM",
                "time_format": "HH: mm",
                "padding_x": 0,
                "padding_y": 0,
                "fontsize": 18,
                "language": "en"
            }
        },
        {
            "position": 3,
            "name": "Feeds",
            "config": {
                "size": [
                    528,
                    30
                ],
                "feed_urls": "file:///home/inky/inky-config/titel-kalender-1.xml",
                "shuffle_feeds": false,
                "padding_x": 0,
                "padding_y": 0,
                "fontsize": 18,
                "language": "de"
            }
        },
        {
            "position": 4,
            "name": "Feeds",
            "config": {
                "size": [
                    528,
                    60
                ],
                "feed_urls": "file:///home/inky/inky-config/rezepte.xml",
                "shuffle_feeds": false,
                "padding_x": 0,
                "padding_y": 0,
                "fontsize": 18,
                "language": "en"
            }
        },
        {
            "position": 5,
            "name": "Jokes",
            "config": {
                "size": [
                    528,
                    150
                ],
                "padding_x": 15,
                "padding_y": 15,
                "fontsize": 16,
                "language": "de"
            }
        }
    ],
    "language": "de",
    "calibration_hours": [
        5,
        13,
        21
    ]
}
$ cd /home/inky/Inkycal && venv/bin/python inky_run.py
inkycal.modules.inkycal_weather loaded
inkycal.modules.inkycal_agenda loaded
inkycal.modules.inkycal_feeds loaded
inkycal.modules.inkycal_feeds loaded
inkycal.modules.inkycal_jokes loaded
loaded inkycal
Inkycal version: v2.0.2
Selected E-paper display: epd_7_in_5_v3_colour
generating image(s) for Weather (openweathermap) - Get weather forecasts from openweathermap...OK!
generating image(s) for Agenda - Display upcoming events from given iCalendars...OK!
generating image(s) for RSS / Atom - Display feeds from given RSS/ATOM feeds...Feeds could be parsed, but the text is too long to be displayed:/
OK!
generating image(s) for RSS / Atom - Display feeds from given RSS/ATOM feeds...OK!
generating image(s) for iCanHazDad API - grab a random joke from icanhazdad api...OK!
Inkycal version: v2.0.2
Selected E-paper display: epd_7_in_5_v3_colour
Date: 10 Jan 24 | Time: 20:59
Generating images for all modules...Feeds could be parsed, but the text is too long to be displayed:/
successful

Expected behavior Characters not cut off/cropped like in weather module or icanhasdadjoke.com modules

Screenshots PXL_20240110_200851430

Desktop (please complete the following information):

  • Inkycal os lite
  • Inky cal tag v2.0.3

Additional context Tested with different font sizes (12-20) and also with global and modules based language settings 'de' and 'en'.

pknee avatar Jan 10 '24 20:01 pknee

Hi there and welcome to Inkycal. Thanks for opening this issue. As this is your first issue in this repository, please read through the contributing guidelines

github-actions[bot] avatar Jan 10 '24 20:01 github-actions[bot]

Marking this issue as stale due to inactivity

github-actions[bot] avatar Mar 16 '24 23:03 github-actions[bot]

@pknee This should be resolved with issue #326 as I've taken a deeper look at the issue. The reason for that was a change in Pillow, requiring a new method to calculate the vertical position of the text as well as the actual height of the text.

Once I've merged #326 , please give this a try to let me know if it works as expected.

aceisace avatar Jun 22 '24 00:06 aceisace