diff --git a/52-noto-sans-cjk.conf b/52-noto-sans-cjk.conf new file mode 100644 index 0000000..32b2515 --- /dev/null +++ b/52-noto-sans-cjk.conf @@ -0,0 +1,246 @@ + + + + + + + + Noto Sans CJK + + + Noto Sans Mono CJK + + + lcdlight + + + hintslight + + + vrgb + + + regular + + + + + + sans-serif + + + zh-cn + + + Noto Sans CJK SC + + + + + serif + + + zh-cn + + + Noto Sans CJK SC + + + + + monospace + + + zh-cn + + + Noto Sans Mono CJK SC + Noto Sans CJK SC + + + + + sans-serif + + + zh-sg + + + Noto Sans CJK SC + + + + + serif + + + zh-sg + + + Noto Sans CJK SC + + + + + monospace + + + zh-sg + + + Noto Sans Mono CJK SC + Noto Sans CJK SC + + + + + + sans-serif + + + zh-tw + + + Noto Sans CJK TC + + + + + serif + + + zh-tw + + + Noto Sans CJK TC + + + + + monospace + + + zh-tw + + + Noto Sans Mono CJK TC + Noto Sans CJK TC + + + + + sans-serif + + + zh-hk + + + Noto Sans CJK TC + + + + + serif + + + zh-hk + + + Noto Sans CJK TC + + + + + monospace + + + zh-hk + + + Noto Sans Mono CJK TC + Noto Sans CJK TC + + + + + sans-serif + + + zh-mo + + + Noto Sans CJK TC + + + + + serif + + + zh-mo + + + Noto Sans CJK TC + + + + + monospace + + + zh-mo + + + Noto Sans Mono CJK TC + Noto Sans CJK TC + + + + + + sans-serif + + + ko + + + Noto Sans CJK KR + + + + + serif + + + ko + + + Noto Sans CJK KR + + + + + monospace + + + ko + + + Noto Sans Mono CJK KR + Noto Sans CJK KR + + + + + + monospace + + + ja + + + Noto Sans Mono CJK JP + Noto Sans CJK JP + + + diff --git a/generate-specfile.sh b/generate-specfile.sh index 31ab9fe..ade4de6 100644 --- a/generate-specfile.sh +++ b/generate-specfile.sh @@ -34,6 +34,9 @@ for h in hinted; do for l in jp kr sc tc ; do obsoletes="$obsoletes noto-sans-cjk$l noto-sans-cjk$l-fonts " done + for j in zh-CN zh-SG zh-TW zh-HK zh-MO ja ko ; do + scalables="$scalables scalable-font-$j" + done fi packagename="$packagename-fonts" summary=`echo "Noto $script $serif_dsc Font" | sed 's:\([a-z]\)\([A-Z]\):\1 \2:'` @@ -42,8 +45,16 @@ for h in hinted; do sed -i "s/@SUBPACKAGE_HEADERS@/Summary: $summary\n@SUBPACKAGE_HEADERS@/" $pkg_name.spec sed -i "s;@SUBPACKAGE_HEADERS@;Group: System/X11/Fonts\n@SUBPACKAGE_HEADERS@;" $pkg_name.spec sed -i "s/@SUBPACKAGE_HEADERS@/Requires: $pkg_name-doc\n@SUBPACKAGE_HEADERS@/" $pkg_name.spec - sed -i "s/@SUBPACKAGE_HEADERS@/Obsoletes: $obsoletes\n@SUBPACKAGE_HEADERS@/" $pkg_name.spec - sed -i "s/@SUBPACKAGE_HEADERS@/Provides: $obsoletes\n@SUBPACKAGE_HEADERS@/" $pkg_name.spec + for i in $obsoletes ; do + sed -i "s/@SUBPACKAGE_HEADERS@/Obsoletes: $i\n@SUBPACKAGE_HEADERS@/" $pkg_name.spec + sed -i "s/@SUBPACKAGE_HEADERS@/Provides: $i\n@SUBPACKAGE_HEADERS@/" $pkg_name.spec + done + if [ "$script" == "CJK" ]; then + for i in $scalables ; do + sed -i "s/@SUBPACKAGE_HEADERS@/Provides: $i\n@SUBPACKAGE_HEADERS@/" $pkg_name.spec + done + sed -i "s/@SUBPACKAGE_HEADERS@/Provides: locale(zh_CN;zh_SG;zh_TW;zh_HK;zh_MO)\n@SUBPACKAGE_HEADERS@/" $pkg_name.spec + fi sed -i "s/@SUBPACKAGE_HEADERS@/%reconfigure_fonts_prereq\n@SUBPACKAGE_HEADERS@/" $pkg_name.spec sed -i "s/@SUBPACKAGE_HEADERS@/\n@SUBPACKAGE_HEADERS@/" $pkg_name.spec sed -i "s/@SUBPACKAGE_HEADERS@/%description -n $packagename\n@SUBPACKAGE_HEADERS@/" $pkg_name.spec @@ -61,6 +72,10 @@ for h in hinted; do sed -i "s:@SUBPACKAGE_FILELISTS@:%{_ttfontsdir}/Noto$serif$script$ui\*.?tf\n@SUBPACKAGE_FILELISTS@:" $pkg_name.spec elif [ "$script" == "CJK" ]; then sed -i "s:@SUBPACKAGE_FILELISTS@:%{_ttfontsdir}/Noto$serif$script$ui\*.ttc\n@SUBPACKAGE_FILELISTS@:" $pkg_name.spec + sed -i "s:@SUBPACKAGE_FILELISTS@:%dir %{_fontsconfdir}\n@SUBPACKAGE_FILELISTS@:" $pkg_name.spec + sed -i "s:@SUBPACKAGE_FILELISTS@:%dir %{_fontsconfddir}\n@SUBPACKAGE_FILELISTS@:" $pkg_name.spec + sed -i "s:@SUBPACKAGE_FILELISTS@:%files_fontsconf_availdir\n@SUBPACKAGE_FILELISTS@:" $pkg_name.spec + sed -i "s:@SUBPACKAGE_FILELISTS@:%files_fontsconf_file -l 52-noto-sans-cjk.conf\n@SUBPACKAGE_FILELISTS@:" $pkg_name.spec else sed -i "s:@SUBPACKAGE_FILELISTS@:%{_ttfontsdir}/Noto$serif$script$ui-\*.?tf\n@SUBPACKAGE_FILELISTS@:" $pkg_name.spec fi diff --git a/google-noto-fonts.changes b/google-noto-fonts.changes index b48b683..a4f77ac 100644 --- a/google-noto-fonts.changes +++ b/google-noto-fonts.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Mar 25 11:23:25 UTC 2016 - i@marguerite.su + +- add 52-noto-sans-cjk.conf, fix boo#972664 "Noto Sans CJK: + Chinese are using Japanese Glyphs". +- add scalable-font-XXX provides to noto-sans-cjk-fonts package +- add locale() to noto-sans-cjk-fonts package, set it as default + font for Chinese. + ------------------------------------------------------------------- Wed Mar 9 14:22:02 UTC 2016 - fcrozat@suse.com diff --git a/google-noto-fonts.spec b/google-noto-fonts.spec index 653d50a..fc9b5fe 100644 --- a/google-noto-fonts.spec +++ b/google-noto-fonts.spec @@ -33,6 +33,7 @@ Url: https://github.com/googlei18n/noto-fonts Source0: https://noto-website-2.storage.googleapis.com/pkgs/Noto-hinted.zip Source1: https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJK.ttc.zip Source2: generate-specfile.sh +Source3: 52-noto-sans-cjk.conf BuildRequires: fontpackages-devel BuildRequires: unzip %reconfigure_fonts_prereq @@ -302,23 +303,31 @@ Summary: Noto CJK Sans Serif Font Group: System/X11/Fonts Requires: google-noto-fonts-doc Obsoletes: noto-sans-cjk -Obsoletes: noto-sans-cjkjp -Obsoletes: noto-sans-cjkjp-fonts -Obsoletes: noto-sans-cjkkr -Obsoletes: noto-sans-cjkkr-fonts -Obsoletes: noto-sans-cjksc -Obsoletes: noto-sans-cjksc-fonts -Obsoletes: noto-sans-cjktc -Obsoletes: noto-sans-cjktc-fonts Provides: noto-sans-cjk +Obsoletes: noto-sans-cjkjp Provides: noto-sans-cjkjp +Obsoletes: noto-sans-cjkjp-fonts Provides: noto-sans-cjkjp-fonts +Obsoletes: noto-sans-cjkkr Provides: noto-sans-cjkkr +Obsoletes: noto-sans-cjkkr-fonts Provides: noto-sans-cjkkr-fonts +Obsoletes: noto-sans-cjksc Provides: noto-sans-cjksc +Obsoletes: noto-sans-cjksc-fonts Provides: noto-sans-cjksc-fonts +Obsoletes: noto-sans-cjktc Provides: noto-sans-cjktc +Obsoletes: noto-sans-cjktc-fonts Provides: noto-sans-cjktc-fonts +Provides: scalable-font-ja +Provides: scalable-font-ko +Provides: scalable-font-zh-CN +Provides: scalable-font-zh-HK +Provides: scalable-font-zh-MO +Provides: scalable-font-zh-SG +Provides: scalable-font-zh-TW +Provides: locale(zh_CN;zh_SG;zh_TW;zh_HK;zh_MO) %reconfigure_fonts_prereq %description -n noto-sans-cjk-fonts @@ -1368,6 +1377,7 @@ unzip -o %{S:1} mkdir -p %{buildroot}%{_ttfontsdir} cp *.ttf %{buildroot}%{_ttfontsdir}/ cp *.ttc %{buildroot}%{_ttfontsdir}/ +%install_fontsconf %{SOURCE3} %reconfigure_fonts_scriptlets -n noto-coloremoji-fonts @@ -1670,6 +1680,10 @@ cp *.ttc %{buildroot}%{_ttfontsdir}/ %defattr(0644,root,root,755) %dir %{_ttfontsdir} %{_ttfontsdir}/NotoSansCJK*.ttc +%dir %{_fontsconfdir} +%dir %{_fontsconfddir} +%files_fontsconf_availdir +%files_fontsconf_file -l 52-noto-sans-cjk.conf %files -n noto-sans-coptic-fonts %defattr(0644,root,root,755) diff --git a/google-noto-fonts.spec.in b/google-noto-fonts.spec.in index 602b573..94b3c5e 100644 --- a/google-noto-fonts.spec.in +++ b/google-noto-fonts.spec.in @@ -1,7 +1,7 @@ # # spec file for package google-noto-fonts # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -32,6 +32,7 @@ Url: https://github.com/googlei18n/noto-fonts Source0: https://noto-website-2.storage.googleapis.com/pkgs/Noto-hinted.zip Source1: https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJK.ttc.zip Source2: generate-specfile.sh +Source3: 52-noto-sans-cjk.conf BuildRequires: fontpackages-devel BuildRequires: unzip %reconfigure_fonts_prereq @@ -64,6 +65,7 @@ unzip -o %{S:1} mkdir -p %{buildroot}%{_ttfontsdir} cp *.ttf %{buildroot}%{_ttfontsdir}/ cp *.ttc %{buildroot}%{_ttfontsdir}/ +%install_fontsconf %{SOURCE3} @SUBPACKAGE_SCRIPTLETS@