Hello team,
I started converting the current julietaula-montserrat-fonts spec to the new version [1] using ibm-plex-fonts as template [2], but struggled to understand the functionality.
Here is an example below:
--
BuildArch: noarch %global fontpkgname julietaula-montserrat %global fontconf 61-%{fontpkgname}
# Override versioning to sync with upstream Epoch: 1 Version: 7.222 Release: %autorelease URL: https://github.com/JulietaUla/Montserrat
%global foundry julietaula %global fontlicense OFL %global fontlicenses OFL.txt %global fontdocsex %{fontlicenses}
%global fontfamily1 Montserrat %global fontsummary1 Sans-serif typeface inspired from Montserrat area %global fonts1 *.otf %global fontdescription1 %{expand: A typeface inspired by signs around the Montserrat area \ of Buenos Aires, Argentina.}
%global fontfamily2 MontserratAlternates %global fontsummary2 Sans-serif typeface inspired from Montserrat area %global fonts2 *.otf %global fontdescription1 %{expand: A typeface inspired by signs around the Montserrat area \ of Buenos Aires, Argentina.}
Source0: %{url}/archive/v%{version}.tar.gz#/Montserrat-%{version}.tar.gz Source1: %{name}-fontconfig.conf Source2: %{name}-alternates-fontconfig.conf Source3: %{fontpkgname}.metainfo.xml Source4: %{fontpkgname}-alternates.metainfo.xml
BuildArch: noarch BuildRequires: fontpackages-devel BuildRequires: libappstream-glib Requires: fontpackages-filesystem
# Reset the old date based versioning Obsoletes: %{name} < 1:%{version}-%{release}
%description %{common_description}
%package common Summary: Common files for %{name} Requires: fontpackages-filesystem
%description common %{common_description} This package consists of files used by other %{name} packages.
%package -n %{fontpkgname} Summary: Base version of the Montserrat area inspired typeface Requires: %{name}-common = %{epoch}:%{version}-%{release}
%description -n %{fo
As noticed, two subpackaged webfonts are listed because they are required from the landing page for Fedora Apache. I
ntpkgname} %{common_description} This package provide the base fonts.
%package -n %{fontpkgname}-alternates-fonts Summary: A Montserrat area inspired typeface family alternate version Requires: %{name}-common = %{epoch}:%{version}-%{release}
%description -n %{fontpkgname}-alternates-fonts %{common_description} This package provide an alternate version of the fonts.
%package -n %{fontpkgname}-base-web-fonts Summary: Web fonts version of the Montserrat area inspired typeface Requires: %{name}-common = %{epoch}:%{version}-%{release}
%description -n %{fontpkgname}-base-web-fonts %{common_description} This package include essential web fonts.
%package -n %{fontpkgname}-extra-web-fonts Summary: Extra web fonts version of the Montserrat area inspired typeface Requires: %{name}-common = %{epoch}:%{version}-%{release}
%description -n %{fontpkgname}-extra-web-fonts %{common_description} This package includes extra web fonts.
%prep %autosetup -c
%build %fontbuild
%install %fontinstall install -m 0644 -p Montserrat-%{version}/fonts/webfonts/*.woff %{buildroot}%{_fontdir} install -m 0644 -p Montserrat-%{version}/fonts/webfonts/*.woff2 %{buildroot}%{_fontdir}
install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \ %{buildroot}%{_fontconfig_confdir}
# Install Montserrat fonts install -m 0644 -p %{SOURCE1} \ %{buildroot}%{_fontconfig_templatedir}/%{fontconf}.conf
# Install MontserratAlternates fonts install -m 0644 -p %{SOURCE2} \ %{buildroot}%{_fontconfig_templatedir}/%{fontconf}-alternates.conf
for fconf in %{fontconf}.conf \ %{fontconf}-alternates.conf ; do ln -s %{_fontconfig_templatedir}/$fconf \ %{buildroot}%{_fontconfig_confdir}/$fconf done
# Add AppStream metadata file, Repeat for every font family install -Dm 0644 -p %{SOURCE3} \ %{buildroot}%{_datadir}/metainfo/%{fontpkgname}.metainfo.xml install -Dm 0644 -p %{SOURCE4} \ %{buildroot}%{_datadir}/metainfo/%{fontpkgname}-alternates.metainfo.xml
%check appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/%{fontpkgname}.metainfo.xml appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/%{fontpkgname}-alternates.metainfo.xml
%_font_pkg -f %{fontconf}.conf Montserrat-*.otf %{_datadir}/metainfo/%{fontpkgname}.metainfo.xml %_font_pkg -n alternates -f %{fontconf}-alternates.conf MontserratAlternates-*.otf %{_datadir}/metainfo/%{fontpkgname}-alternates.metainfo.xml %_font_pkg -n base-web Montserrat-{Regular,Light,Bold,ExtraBold,Italic}.{woff,woff2} %_font_pkg -n extra-web Montserrat*.{woff,woff2}
%files common %license Montserrat-%{version}/OFL.txt %doc Montserrat-%{version}/README.md
%changelog %autochangelog
----
As noticed, two subpackaged webfonts are listed because they are required from the landing page for Fedora Apache. The challenge is to keep these lines with the new spec version. Pointers welcome.
Thanks in advance.
Reference:
[1] https://docs.fedoraproject.org/en-US/packaging-guidelines/FontsPolicy/
[2] https://src.fedoraproject.org/rpms/ibm-plex-fonts/blob/rawhide/f/ibm-plex-fo...
Hi Luya,
As noticed, two subpackaged webfonts are listed because they are
required from the landing page for Fedora Apache. The challenge is to keep these lines with the new spec version. Pointers welcome.
I will suggest you report a re-review of this package and we can discuss packaging in that review bug. Also AFAIK woff font files are not permitted to be packaged. See https://docs.fedoraproject.org/en-US/packaging-guidelines/FontsPolicy/#_font... and https://docs.fedoraproject.org/en-US/packaging-guidelines/FontsPolicy/#_web_...
Regards, Parag
On 2021-10-24 10:18 p.m., Parag Nemade panemade@gmail.com wrote:
Hi Luya,
As noticed, two subpackaged webfonts are listed because they are required from the landing page for Fedora Apache. The challenge is to keep these lines with the new spec version. Pointers welcome.
I will suggest you report a re-review of this package and we can discuss packaging in that review bug. Also AFAIK woff font files are not permitted to be packaged. See https://docs.fedoraproject.org/en-US/packaging-guidelines/FontsPolicy/#_font... https://docs.fedoraproject.org/en-US/packaging-guidelines/FontsPolicy/#_font_file_formats�
Those are subpackages from julietaula-montserrat-fonts needed by fedora-logos-httpd for their landing page. What will be a better alternative to prevent breaking? Maybe apply the changes for Rawhide? Note that some packages fonts provides woff which predated the new policy such as: - comic-neue-web-fonts.noarch - kurdit-unikurd-web-fonts.noarch - mathjax-stixweb-fonts.noarch
Luya
Hi Luya,
On Mon, Oct 25, 2021 at 1:36 PM luya@fedoraproject.org wrote:
On 2021-10-24 10:18 p.m., Parag Nemade panemade@gmail.com wrote:
Hi Luya,
As noticed, two subpackaged webfonts are listed because they are required from the landing page for Fedora Apache. The challenge is to keep these lines with the new spec version. Pointers welcome.
I will suggest you report a re-review of this package and we can discuss packaging in that review bug. Also AFAIK woff font files are not permitted to be packaged. See
https://docs.fedoraproject.org/en-US/packaging-guidelines/FontsPolicy/#_font...
<
https://docs.fedoraproject.org/en-US/packaging-guidelines/FontsPolicy/#_font...
Those are subpackages from julietaula-montserrat-fonts needed by fedora-logos-httpd for their landing page. What will be a better alternative to prevent breaking? Maybe apply the changes for Rawhide? Note that some packages fonts provides woff which predated the new policy such as:
- comic-neue-web-fonts.noarch
- kurdit-unikurd-web-fonts.noarch
- mathjax-stixweb-fonts.noarch
Those packages which are not yet migrated to follow new fonts packaging guidelines are still providing woff files. I think you really don't need woff files for fedora-logos-httpd package. You just need below change in fedora-logos.spec file Recommends: julietaula-montserrat-base-web-fonts to Recommends: julietaula-montserrat-fonts
That should work fine. Firefox will render using Montserrat font only but will use otf files.
Regards, Parag
On Mon, Oct 25, 2021 at 4:59 PM Parag Nemade panemade@gmail.com wrote:
Hi Luya,
On Mon, Oct 25, 2021 at 1:36 PM luya@fedoraproject.org wrote:
On 2021-10-24 10:18 p.m., Parag Nemade panemade@gmail.com wrote:
Hi Luya,
As noticed, two subpackaged webfonts are listed because they are required from the landing page for Fedora Apache. The challenge is
to
keep these lines with the new spec version. Pointers welcome.
I will suggest you report a re-review of this package and we can
discuss
packaging in that review bug. Also AFAIK woff font files are not permitted to be packaged. See
https://docs.fedoraproject.org/en-US/packaging-guidelines/FontsPolicy/#_font...
<
https://docs.fedoraproject.org/en-US/packaging-guidelines/FontsPolicy/#_font...
Those are subpackages from julietaula-montserrat-fonts needed by fedora-logos-httpd for their landing page. What will be a better alternative to prevent breaking? Maybe apply the changes for Rawhide? Note that some packages fonts provides woff which predated the new policy such as:
- comic-neue-web-fonts.noarch
- kurdit-unikurd-web-fonts.noarch
- mathjax-stixweb-fonts.noarch
Those packages which are not yet migrated to follow new fonts packaging guidelines are still providing woff files. I think you really don't need woff files for fedora-logos-httpd package. You just need below change in fedora-logos.spec file Recommends: julietaula-montserrat-base-web-fonts to Recommends: julietaula-montserrat-fonts
That should work fine. Firefox will render using Montserrat font only but will use otf files.
I submitted https://src.fedoraproject.org/rpms/fedora-logos/pull-request/7 now.
Regards,
Parag