Migu fonts の slackwareパッケージ作成
※ Slackwareパッケージ作成用スクリプトは Plamo Linuxのパッケージ情報を参考にさせていただきました。
Thanks to Plamo Linux !!
Miguフォントは、M+ とIPAの合成フォントで、以下の特徴があります。
・ M+フォントに改変を加えて、文字を判別しやすくした
・ IPAゴシックを合成して、漢字をJIS第1水準~第4水準まで持つ
Migu font Home: https://itouhiro.github.io/mixfont-mplus-ipa/migu/
fonts-migu.SlackBuild
[code]
#!/bin/bash # Copyright 2008, 2009 Eric Hameleers, Eindhoven, NL # Copyright 2008, 2009, 2018 Patrick J. Volkerding, Sebeka, MN USA # All rights reserved. # # Permission to use, copy, modify, and distribute this software for # any purpose with or without fee is hereby granted, provided that # the above copyright notice and this permission notice appear in all # copies. # # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # ----------------------------------------------------------------------------- # # Slackware SlackBuild script # =========================== # By: original-Author: Eric Hameleers <alien@slackware.com> (Thanks to Eric) # modified By: J_W<shin1.abe@nifty.com> # For: noto-CJK TTC # Descr: Japanese TTC Unicode fonts # URL: https://github.com/googlefonts/noto-cjk/ # # # ----------------------------------------------------------------------------- cd $(dirname $0) ; CWD=$(pwd) PKGNAM=fonts-migu SRCNAM=Migu VERSION=${VERSION:-20231123} ARCH=noarch BUILD=${BUILD:-1jw} # 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 "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" exit 0 fi TMP=${TMP:-/tmp} PKG=$TMP/package-$PKGNAM rm -rf $PKG mkdir -p $TMP $PKG # Font directory location depends on the X build prefix: # Determine what X we're running (the modular X returns the prefix # in the next command, while older versions stay silent): XPREF=$(pkg-config --variable=prefix x11) || true if [ "$XPREF" == "" ]; then XPREF='/usr/X11R6' FONTDIR="$XPREF/lib/X11/fonts/TTF" else FONTDIR="/usr/share/fonts/TTF" fi cd $TMP mkdir $SRCNAM-$VERSION for source in migu-1c-20200307 migu-1m-20200307 migu-1p-20200307 migu-2m-20231123 do unzip $CWD/${source}.zip done cp -a $TMP/migu-1c-20200307/* $TMP/$SRCNAM-$VERSION/ cp -a $TMP/migu-1m-20200307/* $TMP/$SRCNAM-$VERSION/ cp -a $TMP/migu-1p-20200307/* $TMP/$SRCNAM-$VERSION/ cp -a $TMP/migu-2m-20231123/* $TMP/$SRCNAM-$VERSION/ #remove unnecessary source directories rm -rf $TMP/migu-1c-2020030 $TMP/migu-1m-20200307 $TMP/migu-1p-20200307 $TMP/migu-2m-20231123 cd $TMP/$SRCNAM-$VERSION/ chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ -exec chmod 755 {} \+ -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \+ # Install fonts: install -Dm644 -v *.ttf -t $PKG/usr/share/fonts/TTF/ install -Dm644 -v $CWD/20-unhint-migu.conf $PKG/usr/share/fontconfig/conf.avail/20-unhint-migu.conf install -Dm644 -v $CWD/62-fonts-migu.conf $PKG/usr/share/fontconfig/conf.avail/62-fonts-migu.conf install -dm755 -v $PKG/etc/fonts/conf.d/ ( cd $PKG/etc/fonts/conf.d for f in ../../../usr/share/fontconfig/conf.avail/*.conf do ln -sf $f $(basename $f) done ) # Post-install script: mkdir -p $PKG/install cat << EOT > $PKG/install/doinst.sh # There's no need to chroot and do this during initial # install, since there is a post-install script that # does the same thing, saving time. # Update X font indexes and the font cache: if [ -x /usr/bin/mkfontdir ]; then /usr/bin/mkfontscale $FONTDIR 2> /dev/null /usr/bin/mkfontdir $FONTDIR 2> /dev/null fi if [ -x /usr/bin/fc-cache ]; then /usr/bin/fc-cache $FONTDIR 2> /dev/null fi EOT # Add documentation: mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION cp -a $CWD/${PKGNAM}.SlackBuild $CWD/url.info $TMP/$SRCNAM-$VERSION/ipag00303/*.txt \ $TMP/$SRCNAM-$VERSION/mplus-TESTFLIGHT-063a/README* \ $TMP/$SRCNAM-$VERSION/migu-README.txt $PKG/usr/doc/$PKGNAM-$VERSION find $PKG/usr/doc -type f -exec chmod 644 {} \+ # Add a package description: mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG /sbin/makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz |
url.info
slack-desc
[code]
Home: https://itouhiro.github.io/mixfont-mplus-ipa/migu/ https://github.com/itouhiro/mixfont-mplus-ipa/releases/download/v2020.0307/migu-1p-20200307.zip https://github.com/itouhiro/mixfont-mplus-ipa/releases/download/v2020.0307/migu-1c-20200307.zip https://github.com/itouhiro/mixfont-mplus-ipa/releases/download/v2020.0307/migu-1m-20200307.zip https://github.com/itouhiro/mixfont-mplus-ipa/releases/download/v2023.1123/migu-2m-20231123.zip |
20-unhint-migu.conf
[code]
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <match target="font"> <test name="family"> <string>Migu 1C</string> </test> <edit name="autohint"> <bool>false</bool> </edit> </match> <match target="font"> <test name="family"> <string>Migu 1M</string> </test> <edit name="autohint"> <bool>false</bool> </edit> </match> <match target="font"> <test name="family"> <string>Migu 1P</string> </test> <edit name="autohint"> <bool>false</bool> </edit> </match> <match target="font"> <test name="family"> <string>Migu 2M</string> </test> <edit name="autohint"> <bool>false</bool> </edit> </match> <match target="font"> <test name="family"> <string>Migu 2P</string> </test> <edit name="autohint"> <bool>false</bool> </edit> </match> </fontconfig> |
62-fonts-migu.conf
[code]
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <alias> <family>sans-serif</family> <prefer> <family>Migu 1C</family> <family>Migu 1M</family> <family>Migu 1P</family> <family>Migu 2M</family> <family>Migu 2P</family> </prefer> </alias> <alias> <family>monospace</family> <prefer> <family>Migu 1M</family> <family>Migu 2M</family> </prefer> </alias> </fontconfig> |
slack-desc
[code]
# HOW TO EDIT THIS FILE: # The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' # on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. |-----handy-ruler------------------------------------------------------| fonts-migu: fonts-migu (Combination fonts of M+ and IPA fonts) fonts-migu: fonts-migu: Migu font is a combination of M+ and IPA fonts. fonts-migu: Miguフォントの特徴: fonts-migu: M+フォントに改変を加えて、文字を判別しやすくした fonts-migu: IPAゴシックを合成して、漢字をJIS第1水準~第4水準まで持つ fonts-migu: fonts-migu: Homepage: https://itouhiro.github.io/mixfont-mplus-ipa/migu/ fonts-migu: fonts-migu: fonts-migu: |
===