diff --git a/aports/main/postmarketos-splash/APKBUILD b/aports/main/postmarketos-splash/APKBUILD index accb5860..597ae31b 100644 --- a/aports/main/postmarketos-splash/APKBUILD +++ b/aports/main/postmarketos-splash/APKBUILD @@ -9,7 +9,7 @@ depends="ttf-dejavu ttf-droid py3-pillow" makedepends="" install="" subpackages="" -source="make-splash.py config.ini" +source="make-splash.py config.ini https://github.com/postmarketOS/artwork/raw/master/logo/pmos.ttf" build() { return 0 @@ -20,7 +20,10 @@ package() { "$pkgdir"/usr/bin/pmos-make-splash install -D -m644 "$srcdir"/config.ini \ "$pkgdir"/etc/postmarketos/splash.ini + install -D -m644 "$srcdir"/pmos.ttf \ + "$pkgdir"/usr/share/fonts/ttf-pmos/pmos.ttf } -sha512sums="cd3593579d357bb16fd9c6754e66eb8702e7d6199c5e9f7024735f410d5365ff3d1a7199b8075aa7b502785c2de0f9302f8d492d3e005688e4f93883d344c3ac make-splash.py -82234147a5e907203edb8f8531aba63d96156b600b148a8d986b1978ce2641ebf875880f4075709e8b5e8f92948598319f5157473ddcc14cf00be004255e44bc config.ini" +sha512sums="1bc981e21d2186dcc8bbc1cea1d8893aa4be5bace763e4df7e91c6949babcc612f12ff4426d0e592f810c7d3448dba3d603ebfce5eb2eb0fd76f6cca8e571139 make-splash.py +cdde481bf7c68840515b839d974dd1dddfb37551a2939780e13dce11331f7d1964043de48f8902a30372e9fc9f042bd4ee133e2098694739c452a76b70e97111 config.ini +81e5df350bf7f435ab5480f7028fc3cabf5a947fa0dff1ed219f6d9ac18a1250f5114887a9f5f270cc699af48cd77f23d14a84578ac8d2d0f3a3e90ec3211c45 pmos.ttf" diff --git a/aports/main/postmarketos-splash/config.ini b/aports/main/postmarketos-splash/config.ini index 3fd84882..1f60bcc7 100644 --- a/aports/main/postmarketos-splash/config.ini +++ b/aports/main/postmarketos-splash/config.ini @@ -7,9 +7,10 @@ font=/usr/share/fonts/ttf-droid/DroidSans.ttf color=#fff [logo] -text=♻ -font=/usr/share/fonts/ttf-dejavu/DejaVuSans.ttf +text= +font=/usr/share/fonts/ttf-pmos/pmos.ttf color=#090 +spacing=1 [text] font=/usr/share/fonts/ttf-droid/DroidSans.ttf diff --git a/aports/main/postmarketos-splash/make-splash.py b/aports/main/postmarketos-splash/make-splash.py index ff501d89..82ea59a9 100644 --- a/aports/main/postmarketos-splash/make-splash.py +++ b/aports/main/postmarketos-splash/make-splash.py @@ -15,6 +15,8 @@ def make_splash(width, height, filename, landscape=False, text="", config_file=N im = Image.new('RGB', (width, height), color=config.get('background', 'color', fallback=0)) draw = ImageDraw.Draw(im) + spacing = width / 100 * float(config.get('logo', 'spacing', fallback='0')) + font_size = int(width / 13) logo_size = int(width / 10) text_size = int(width / 30) @@ -33,10 +35,10 @@ def make_splash(width, height, filename, landscape=False, text="", config_file=N name_width, name_height = draw.textsize(name, font=name_font) logo_width, logo_height = draw.textsize(logo, font=logo_font) - draw.text(((width - (name_width + logo_width)) / 2 + logo_width, (height - name_height) / 2), name, + draw.text(((width - (name_width + logo_width)) / 2 + logo_width + spacing, (height - name_height) / 2), name, config.get('name', 'color', fallback='#ffffff'), font=name_font) - draw.text(((width - (name_width + logo_width)) / 2, (height - name_height) / 2), logo, + draw.text(((width - (name_width + logo_width + spacing)) / 2, (height - name_height) / 2), logo, config.get('logo', 'color', fallback='#009900'), font=logo_font)