diff --git a/.github/workflows/overlay.toml b/.github/workflows/overlay.toml index 52066756dea..03c4935b703 100644 --- a/.github/workflows/overlay.toml +++ b/.github/workflows/overlay.toml @@ -823,6 +823,13 @@ use_latest_release = true prefix = "v" github_account = "Linerre" +["media-fonts/Shanggu"] +source = "github" +github = "GuiWonder/Shanggu" +use_latest_release = true +prefix = "v" +github_account = "Linerre" + # TODO: version not found: https://sites.google.com/view/jtfoundry/zh-tw/downloads #["media-fonts/taipei-sans-tc"] diff --git a/media-fonts/Shanggu/Manifest b/media-fonts/Shanggu/Manifest new file mode 100644 index 00000000000..35812b83ec3 --- /dev/null +++ b/media-fonts/Shanggu/Manifest @@ -0,0 +1,4 @@ +DIST ShangguMono-1.021.7z 48145274 BLAKE2B 610a52e00b991dd23569347d2fc44c522384647c2af46e8319fb922541f27a96b101eedf48406c4be8b47f85fdf94ed0ae704c9f9f8c8f522936c0311f996eee SHA512 04cc5efbd7034fcdb8acdd5d6363d2fbd9f589daca23a87afa0789f2537d972463e2c1f12fe2f82925ce59b5090f82e46e054a1b114d6c879e8bffd1c40c4f15 +DIST ShangguRound-1.021.7z 50298854 BLAKE2B efc8e4189e9185d06c0ba576a08dae1e52b1b85649734f8b8e93edd810c34bf53a9d6ce905c9648c05850667380fbd74c18b1399dc14d91960572b961a421b23 SHA512 9770d957d010986551953f9247671f84570adc737e7af44f0ee3ece814cf60826500b302fc8d8d5f8572d6ed57cf13064044afb281d614b7cca213579d1d49ff +DIST ShangguSans-1.021.7z 46665936 BLAKE2B 83a32f14b13c7aa390518e3303cf96efca9d8b6eb02809e39c0e4509109d4bff43f4692e59872e3ebc344964256a0716c68838273794d894fb40e2520adc130d SHA512 3ce3794537dd5855d564d01977b4f066f517962afdf557fbf7c8b4265afbcf9019d5c836155f72394cf2409bae004333c44e8fe737e80890e6cab70ac6c0eb9f +DIST ShangguSerif-1.021.7z 67705930 BLAKE2B 4a44c66b32ccdcda07a9fe518bb6096ae83de977225ca4564406a01fb5bc95274c1d6131571e8e2846c2dcbaf9dc9822062c6acd617b7b885f6a6ae10741e354 SHA512 555f7611e892c737e9780d4520c7b754181c4c434e1d418d0fcf8f044f7805f2c5f54cee0b93b0e4f5f91840b68c9e75a4dd9badb14e0d7486af73671395e711 diff --git a/media-fonts/Shanggu/Shanggu-1.021.ebuild b/media-fonts/Shanggu/Shanggu-1.021.ebuild new file mode 100644 index 00000000000..5576ec9686c --- /dev/null +++ b/media-fonts/Shanggu/Shanggu-1.021.ebuild @@ -0,0 +1,80 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit font unpacker + +DESCRIPTION="A Noto-based font for traditional Chinese characters" +HOMEPAGE="https://github.com/GuiWonder/Shanggu" + +SRC_URI=" + mono? ( https://github.com/GuiWonder/${PN}/releases/download/${PV}/${PN}MonoTTFs.7z -> ${PN}Mono-${PV}.7z ) + round? ( https://github.com/GuiWonder/${PN}/releases/download/${PV}/${PN}RoundTTFs.7z -> ${PN}Round-${PV}.7z ) + sans? ( https://github.com/GuiWonder/${PN}/releases/download/${PV}/${PN}SansTTFs.7z -> ${PN}Sans-${PV}.7z ) + serif? ( https://github.com/GuiWonder/${PN}/releases/download/${PV}/${PN}SerifTTFs.7z -> ${PN}Serif-${PV}.7z ) +" + +S="${WORKDIR}" +LICENSE="OFL-1.1" +SLOT="0" +KEYWORDS="~amd64" +IUSE="round sans +serif mono" +REQUIRED_USE="|| ( round sans serif mono )" +BDEPEND=" + app-arch/p7zip +" + +FONT_SUFFIX="ttf" + +src_unpack() { + use mono && unpack_7z "${PN}Mono-${PV}.7z" + use round && unpack_7z "${PN}Round-${PV}.7z" + use sans && unpack_7z "${PN}Sans-${PV}.7z" + use serif && unpack_7z "${PN}Serif-${PV}.7z" +} + +src_install() { + if use serif; then + FONT_S=( + "${S}/${PN}Serif" + "${S}/${PN}SerifFANTI" + "${S}/${PN}SerifJP" + "${S}/${PN}SerifSC" + "${S}/${PN}SerifTC" + ) + font_src_install + fi + + if use sans; then + FONT_S=( + "${S}/${PN}Sans" + "${S}/${PN}SansFANTI" + "${S}/${PN}SansJP" + "${S}/${PN}SansSC" + "${S}/${PN}SansTC" + ) + font_src_install + fi + + if use mono; then + FONT_S=( + "${S}/${PN}Mono" + "${S}/${PN}MonoJP" + "${S}/${PN}MonoSC" + "${S}/${PN}MonoTC" + ) + font_src_install + fi + + if use round; then + FONT_S=( + "${S}/${PN}Round" + "${S}/${PN}RoundFANTI" + "${S}/${PN}RoundJP" + "${S}/${PN}RoundSC" + "${S}/${PN}RoundTC" + ) + font_src_install + fi +} diff --git a/media-fonts/Shanggu/metadata.xml b/media-fonts/Shanggu/metadata.xml new file mode 100644 index 00000000000..a870d10887d --- /dev/null +++ b/media-fonts/Shanggu/metadata.xml @@ -0,0 +1,17 @@ + + + + + leon.errelin@outlook.com + Linerre + + + Install ShangguMono font family + Install ShangguRound font family + Install ShangguSans font family + Install ShangguSerif font family (default) + + + GuiWonder/Shanggu + +