%global fontname fraunces %global fontarchive Fraunces %global foundry undercasetype %global fontconf 60-%{fontname} %global commit master %global fontext otf %global fontvarext ttf %global fontsstat fonts/static/%{fontext} %global fontsvar fonts %global fontsvarpref var %global tmp_ttx TMP_ttx %global tmp_edited TMP_ttx2 %global tmp_fonts TMP_fonts %global common_desc %{expand: Fraunces was designed by Phaedra Charles and Flavia Zimbardi, partners at Undercase Type. Inspired by the mannerisms of early 20th century typefaces such as Windsor, Souvenir, and the Cooper Series. Fraunces is a Variable Font with four axes: Weight (wght), Optical Size (opsz), Softness (SOFT), and Wonky (WONK). The Softness axis controls the “wetness” or “inkiness” of the typeface. The Wonky axis controls the manual substitution of “wonky” characters, such as the lean of the h, n, and m glyphs in the Roman, and the flagged ball terminals of the b, d, h, k, l, v, and w glyphs of the Italic. } Name: %{foundry}-%{fontname}-fonts Version: 1.101 Release: K05%{?dist} Summary: Fraunces is a display, "Old Style" soft-serif typeface inspired by the mannerisms of early 20th century typefaces. Group: User Interface/X License: SIL OFL URL: https://github.com/%{foundry}/%{filename} Source0: %{fontarchive}-%{commit}.zip Source1: %{name}.conf Source2: fix_names.pl BuildArch: noarch BuildRequires: fontpackages-devel BuildRequires: perl BuildRequires: perl-XML-LibXML BuildRequires: fonttools Requires: %{name}-common = %{version}-%{release} Obsoletes: %{fontname}-stat-fonts < %{version}-%{release} Obsoletes: %{fontname}-var-fonts < %{version}-%{release} %description %common_desc This package includes only static fonts. ##################### %package common Summary: Common files of %{name} %description common %common_desc This package consists of files used by other %{name} packages. ##################### %package %{fontsvarpref} Summary: Saira is a sans serif system. It features a huge range of weights and widths. Requires: %{name}-common = %{version}-%{release} %description %{fontsvarpref} %common_desc This package includes only variable fonts. #----------------------------------------------------------------------# %prep %setup -q -c %{fontarchive}-%{commit} %build # Fix the FontFamily names. rm -fr %{tmp_ttx} mkdir -p %{tmp_ttx} ttx -f -q -d %{tmp_ttx} %{fontarchive}-%{commit}/%{fontsstat}/*.%{fontext} perl %{SOURCE2} in=%{tmp_ttx} out=%{tmp_edited} WAF rm -fr %{tmp_fonts} mkdir -p %{tmp_fonts} ttx -f -q -d %{tmp_fonts} %{tmp_edited}/*.ttx # Add prefix to variable fonts. for f in %{fontarchive}-%{commit}/%{fontsvar}/*.%{fontvarext}; do fn=${f##*/} mv -- "$f" "%{fontarchive}-%{commit}/%{fontsvar}/%{fontsvarpref}-$fn" done %install install -m 0755 -d %{buildroot}%{_fontdir} install -m 0644 -p %{tmp_fonts}/*.%{fontext} %{buildroot}%{_fontdir} install -m 0644 -p %{fontarchive}-%{commit}/%{fontsvar}/%{fontsvarpref}-*.%{fontvarext} %{buildroot}%{_fontdir} install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \ %{buildroot}%{_fontconfig_confdir} # Repeat for every font family install -m 0644 -p %{SOURCE1} \ %{buildroot}%{_fontconfig_templatedir}/%{fontconf}.conf for fconf in %{fontconf}.conf \ ; do ln -s %{_fontconfig_templatedir}/$fconf \ %{buildroot}%{_fontconfig_confdir}/$fconf done %files %defattr(0644,root,root,-) %{_fontdir}/%{fontarchive}*.%{fontext} %files %{fontsvarpref} %defattr(0644,root,root,-) %{_fontdir}/%{fontsvarpref}-%{fontarchive}*.%{fontvarext} %files common %defattr(0644,root,root,-) %doc %{fontarchive}-%{commit}/AUTHORS.txt %{fontarchive}-%{commit}/CONTRIBUTORS.txt %{fontarchive}-%{commit}/README.md %{fontarchive}-%{commit}/*.html %license %{fontarchive}-%{commit}/OFL.txt %{_fontconfig_confdir}/%{fontconf}.conf %{_fontconfig_templatedir}/%{fontconf}.conf %changelog * Mon Apr 14 2025 Karlis Kalviskis - 1.101-K05 - Fixed font family names for static fonts. - Fixed font configuration file.