diff options
Diffstat (limited to 'system/ttf-ubuntu-font-family')
3 files changed, 84 insertions, 11 deletions
diff --git a/system/ttf-ubuntu-font-family/81-ubuntu.conf b/system/ttf-ubuntu-font-family/81-ubuntu.conf new file mode 100644 index 0000000000..751bb11208 --- /dev/null +++ b/system/ttf-ubuntu-font-family/81-ubuntu.conf @@ -0,0 +1,66 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<fontconfig> + +<!-- Fixes for Ubuntu family: + - Medium variant is used instead of Regular on Qt apps: + https://bugs.launchpad.net/ubuntu-font-family/+bug/744812 + - Medium and Bold looks the same in certain applications: + https://bugs.launchpad.net/ubuntu/+source/gnome-specimen/+bug/813373 +--> + +<match target="scan"> + <test name="fullname" compare="eq"> + <string>Ubuntu Light</string> + </test> + <edit name="family" mode="assign"> + <string>Ubuntu</string> + </edit> + <edit name="style" mode="assign"> + <string>Light</string> + </edit> +</match> + +<match target="scan"> + <test name="fullname" compare="eq"> + <string>Ubuntu Light Italic</string> + </test> + <edit name="family" mode="assign"> + <string>Ubuntu</string> + </edit> + <edit name="style" mode="assign"> + <string>Light Italic</string> + </edit> +</match> + +<match target="scan"> + <test name="fullname" compare="eq"> + <string>Ubuntu Medium</string> + </test> + <edit name="family" mode="assign"> + <string>Ubuntu</string> + </edit> + <edit name="style" mode="assign"> + <string>Medium</string> + </edit> + <edit name="weight" mode="assign"> + <const>demibold</const> + </edit> +</match> + +<match target="scan"> + <test name="fullname" compare="eq"> + <string>Ubuntu Medium Italic</string> + </test> + <edit name="family" mode="assign"> + <string>Ubuntu</string> + </edit> + <edit name="style" mode="assign"> + <string>Medium Italic</string> + </edit> + <edit name="weight" mode="assign"> + <const>demibold</const> + </edit> +</match> + +</fontconfig> diff --git a/system/ttf-ubuntu-font-family/ttf-ubuntu-font-family.SlackBuild b/system/ttf-ubuntu-font-family/ttf-ubuntu-font-family.SlackBuild index 8991fceab0..9fd53fee07 100644 --- a/system/ttf-ubuntu-font-family/ttf-ubuntu-font-family.SlackBuild +++ b/system/ttf-ubuntu-font-family/ttf-ubuntu-font-family.SlackBuild @@ -5,6 +5,8 @@ # Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org # Copyright 2010-2012 Binh Nguyen <binhvng@gmail.com> +# Copyright 2017-2024 klaatu <klaatu@member.fsf.org> +# Copyright 2025 Isaac Yu <isaacyu@protonmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -28,15 +30,14 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=ttf-ubuntu-font-family VERSION=${VERSION:-0.83} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} ARCH=noarch +SRCNAM=ubuntu-font-family +SRCPREFIX=0cef8205 -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -51,9 +52,9 @@ set -eu rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf ubuntu-font-family-$VERSION -unzip $CWD/ubuntu-font-family-$VERSION.zip -cd ubuntu-font-family-$VERSION +rm -rf $SRCNAM-$VERSION +unzip $CWD/$SRCPREFIX-$SRCNAM-$VERSION.zip $SRCNAM-$VERSION/* || unzip $CWD/$SRCNAM-$VERSION.zip $SRCNAM-$VERSION/* +cd $SRCNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -64,6 +65,12 @@ find -L . \ mkdir -p $PKG/usr/share/fonts/TTF cp -a *.ttf $PKG/usr/share/fonts/TTF +# Font fixes. This is taken and adapted from Arch Linux repos: +# https://gitlab.archlinux.org/archlinux/packaging/packages/ttf-ubuntu-font-family/-/blob/main/81-ubuntu.conf +mkdir -p $PKG/etc/fonts/conf.d $PKG/etc/fonts/conf.avail +cp $CWD/81-ubuntu.conf $PKG/etc/fonts/conf.avail/81-ubuntu.conf +ln -s ../conf.avail/81-ubuntu.conf $PKG/etc/fonts/conf.d/81-ubuntu.conf + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a *.txt $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild diff --git a/system/ttf-ubuntu-font-family/ttf-ubuntu-font-family.info b/system/ttf-ubuntu-font-family/ttf-ubuntu-font-family.info index f12527ae56..8c5b16a307 100644 --- a/system/ttf-ubuntu-font-family/ttf-ubuntu-font-family.info +++ b/system/ttf-ubuntu-font-family/ttf-ubuntu-font-family.info @@ -1,10 +1,10 @@ PRGNAM="ttf-ubuntu-font-family" VERSION="0.83" HOMEPAGE="http://font.ubuntu.com/" -DOWNLOAD="http://ponce.cc/slackware/sources/repo/ubuntu-font-family-0.83.zip" -MD5SUM="a24b8136b8f3bb93f166baf97d9328de" +DOWNLOAD="https://assets.ubuntu.com/v1/0cef8205-ubuntu-font-family-0.83.zip" +MD5SUM="c5a5059d6856b4ddf79d824dcaf5ad32" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="klaatu" -EMAIL="klaatu@member.fsf.org" +MAINTAINER="Isaac Yu" +EMAIL="isaacyu@protonmail.com" |