feat(global-fonts): restructure directory and add Noto CJK variable fonts
Props @ryelle for the original font enqueue implementation
Summary
- Refactored the
global-fontsdirectory structure for better clarity and scalability. - Created a new
NotoCJKdirectory withSans/andSerif/subdirectories. - Removed ambiguous
notoandnotoserifdirectories and consolidated them underNotoCJK. - Added
NotoSansandNotoSerifCJKVariableFont_wght.woff2files for HK, JP, KR, SC, and TC regions.
Details
- Existing files in the old
NotoSerifdirectory remain intact. - Recompressed existing fonts to
.woff2; file sizes slightly reduced for unknown reasons, but verified to be functional. - this PR only includes the font files and directory restructuring.
Changes
- Added:
mu-plugins/global-fonts/NotoCJK/Sans/ - Added:
mu-plugins/global-fonts/NotoCJK/Serif/ - Added:
NotoSans*andNotoSerif*CJK VariableFont files (.woff2) for HK, JP, KR, SC, and TC.
Notes
- No functionality changes in themes yet.
- Path updates in theme enqueue functions will be handled separately.
๐ก Korean summary (์ค๋ช ์ฉ)
- ๊ธ๋ก๋ฒ ํฐํธ ๋๋ ํ ๋ฆฌ์
noto,notoserif๋ฅผ ์ ๋ฆฌํ๊ณNotoCJK๋๋ ํ ๋ฆฌ๋ก ํตํฉ -
NotoCJK/Sans,NotoCJK/Serif๋ก ๋๋ ํ ๋ฆฌ ๊ตฌ์กฐ ๋ฆฌํฉํ ๋ง - HK, JP, KR, SC, TC์ฉ
NotoSans,NotoSerifCJK VariableFont.woff2์ถ๊ฐ - ๊ธฐ์กด
NotoSerifํฐํธ๋ ์ ์ง, ์์ถํด์ ์ฝ๊ฐ ์ฉ๋ ๊ฐ์ ํ์ธ - ํ ๋ง ๊ฒฝ๋ก๋ ์์ง ์์ ํ์ง ์์. ํ์ผ๋ง ์ ๋ฆฌ ์๋ฃ
https://github.com/google/woff2 sudo apt update sudo apt install make g++ git cd /mnt/c/Users/thaum/dev
git clone --recursive https://github.com/google/woff2.git cd woff2 make clean all
./woff2_compress /mnt/c/Users/thaum/dev/noto/NotoSerifKR-VariableFont_wght.ttf ./woff2_compress /mnt/c/Users/thaum/dev/noto/NotoSansKR-VariableFont_wght.ttf
./woff2_compress /mnt/c/Users/thaum/dev/noto/NotoSerifJP-VariableFont_wght.ttf https://fonts.google.com/noto/specimen/Noto+Sans+JP ./woff2_compress /mnt/c/Users/thaum/dev/noto/NotoSansJP-VariableFont_wght.ttf
./woff2_compress /mnt/c/Users/thaum/dev/noto/NotoSerifSC-VariableFont_wght.ttf ./woff2_compress /mnt/c/Users/thaum/dev/noto/NotoSansSC-VariableFont_wght.ttf
./woff2_compress /mnt/c/Users/thaum/dev/noto/NotoSerifTC-VariableFont_wght.ttf https://fonts.google.com/noto/specimen/Noto+Sans+TC ./woff2_compress /mnt/c/Users/thaum/dev/noto/NotoSansTC-VariableFont_wght.ttf
./woff2_compress /mnt/c/Users/thaum/dev/noto/NotoSerifHK-VariableFont_wght.ttf ./woff2_compress /mnt/c/Users/thaum/dev/noto/NotoSansHK-VariableFont_wght.ttf
https://github.com/WordPress/wporg-mu-plugins/pull/686 https://github.com/WordPress/wporg-mu-plugins/pull/685 https://github.com/WordPress/wporg-mu-plugins/pull/684 https://github.com/WordPress/wporg-mu-plugins/pull/630 https://github.com/WordPress/wporg-parent-2021/issues/175