Bug 2081539 - Review Request: vazirmatn-fonts - A simple and legible Persian/Arabic typeface
Summary: Review Request: vazirmatn-fonts - A simple and legible Persian/Arabic typeface
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Zbigniew Jędrzejewski-Szmek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-03 22:33 UTC by Hedayat Vatankhah
Modified: 2022-06-04 11:00 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-04 11:00:12 UTC
Type: ---
Embargoed:
zbyszek: fedora-review+


Attachments (Terms of Use)

Description Hedayat Vatankhah 2022-05-03 22:33:41 UTC
Spec URL: https://hedayat.fedorapeople.org/reviews/vazirmatn-fonts.spec
SRPM URL: https://kojipkgs.fedoraproject.org//work/tasks/8174/86808174/vazirmatn-fonts-32.101-1.fc37.src.rpm
Description: Vazirmatn is a Persian/Arabic font project that started in 2015 under the name of Vazir with the idea of a new simple and legible typeface suitable for web pages and applications. Thanks to DejaVu Sans font (v2.35) published in public domain there was a free software base to start the Vazir project. Although Vazir was completely different in typeface, still the original software was common. For Latin glyphs, Vazirmatn is combined with Roboto font by a build script, however there is also a version without Latin glyphs (Non-Latin).

Fedora Account System Username: hedayat

Koji scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=86808099

Wiki Page: https://fedoraproject.org/wiki/Vazirmatn_fonts

Comment 2 Parag AN(पराग) 2022-05-15 07:52:19 UTC
I wanted to review but not getting time. The more complex/subpackages in SPEC, more it will take time to review.
Can you first try to remove comments from SPEC file and submit again same package?

Comment 3 Parag AN(पराग) 2022-05-15 08:09:16 UTC
Just to note one more thing after quicklook, Family names should be written as they are in font files. You have added hyphen in place of space character.
e.g. %global fontfamily7       Vazirmatn-RD-UI-NL
should be written as 
%global fontfamily7       Vazirmatn RD UI NL

Just check the metadata of font Vazirmatn-UI-FD-NL-Regular.ttf which shows
Family:              Vazirmatn UI FD NL

So correct the same for all other sub-packages. Remove all comments to make SPEC file more readable.

Comment 4 Hedayat Vatankhah 2022-05-15 13:06:58 UTC
Yes, sure. And thank you for reviewing my package :)

Just a quick question (part of the above emails): should I package variable version of the fonts separately from the normal ones? I've seen that at least some fonts, e.g. the Noto fonts, have separate package for variable fonts (-vf subpackages), but I don't know if I should do the same (by definition, seems that all of them belong to a single family). If I can/should put them in a separate subpackage, what should their fontconfig file contain? For Noto (Arabic) fonts, I saw the variable fonts have 'have hints' (not the exact word) set to true while non-variable version has set it to false. I wonder if the same thing is correct for all variable fonts or it is just specific to Noto fonts?

Thanks again, I'll upload a new version in a few hours.

Comment 5 Akira TAGOH 2022-05-16 03:39:28 UTC
(In reply to Hedayat Vatankhah from comment #4)
> Yes, sure. And thank you for reviewing my package :)
> 
> Just a quick question (part of the above emails): should I package variable
> version of the fonts separately from the normal ones? I've seen that at
> least some fonts, e.g. the Noto fonts, have separate package for variable
> fonts (-vf subpackages), but I don't know if I should do the same (by
> definition, seems that all of them belong to a single family). If I
> can/should put them in a separate subpackage, what should their fontconfig
> file contain? For Noto (Arabic) fonts, I saw the variable fonts have 'have
> hints' (not the exact word) set to true while non-variable version has set
> it to false. I wonder if the same thing is correct for all variable fonts or
> it is just specific to Noto fonts?
> 
> Thanks again, I'll upload a new version in a few hours.

You should have a variable font in a separate package because both, variable and non-variable fonts eventually looks same at the application level as they have same family name and both is available at a sort of the font picker which isn't better experience. Also, the users aren't able to recognize which one is a variable or non-variable.
This is the reason why we have a separate package for variable and non-variable fonts.
For "fonthashint" property in fontconfig, variable fonts doesn't have hinting. fontconfig has a recipe to enable "autohint"ing if "fonthashint" is set to false. this is to provide better rendering with variable fonts.

Hope that helps.

Comment 6 Hedayat Vatankhah 2022-05-16 22:15:22 UTC
Thanks a lot, so I"ll create separate sub-packages for variable fonts. However, you said that variable fonts should have "fonthashint" property set to false. But, for Noto Arabic fonts, it is the other way around: VF fonts have set fonthashint property set to true while Non-VF fonts have set it to false. This is from 56-google-noto-sans-arabic-vf.conf:

    <edit name="fonthashint" mode="append">
      <bool>true</bool>
    </edit>

Which one is correct?

Comment 7 Akira TAGOH 2022-05-17 07:12:30 UTC
Sorry, "variable fonts and hinting" thing was false alarm. actually it depends. "fonthashint" property is supposed to be added by fontconfig automatically. If you don't like it, you can modify it. and "fonthashint" is set to false, autohinting will be used for them. this logic is supposed to be done by 09-autohint-if-no-hinting.conf though, this one isn't however enabled by default. I totally missed that. So it wouldn't affect so much so far.

Comment 8 Hedayat Vatankhah 2022-05-17 08:58:32 UTC
So, If I've understood correctly, there is no global rule about fonthashint property and VF/NON-VF fonts. In that case, should I share the same fontconfig config file between VF & non-VF packages without specifying any extra properties like fonthashint? (Since I have no clue if the fonts need such properties)

Comment 9 Akira TAGOH 2022-05-17 09:05:44 UTC
Yes, you can if both rendering looks same and/or fine.

Comment 10 Hedayat Vatankhah 2022-05-20 00:40:25 UTC
OK, I've uploaded new SPEC and SRPM. Now, variable fonts are packaged separately, and most comments are removed. Family names are also fixed.

SPEC: https://hedayat.fedorapeople.org/reviews/vazirmatn-fonts.spec
SRPM: https://kojipkgs.fedoraproject.org//work/tasks/7001/87267001/vazirmatn-fonts-32.101-1.fc37.src.rpm
Koji Build: https://koji.fedoraproject.org/koji/taskinfo?taskID=87266999

Comment 11 Parag AN(पराग) 2022-05-20 02:03:54 UTC
Always bump the release tag when you provide updated SPEC and SRPM. This will help to track how this package got reviewed and progressed. Add appropriate Changelog entry for each release bump.

Comment 13 Zbigniew Jędrzejewski-Szmek 2022-05-27 06:52:38 UTC
For the Release and %changelog fields, I'd strongly suggest %autorelease and %autochangelog.
It is optional, but it'll save you a lot of typing during package updates.
(This goes against the request by Parag to do changelog entries doing devel, sorry.)

[1] https://docs.pagure.org/fedora-infra.rpmautospec/principle.html

The text in %description should either be wrapped to <=80 columns, or not at all.
'rpm -qi' will line-break the text, so if there line-breaks within paragraphs,
the text becomes jagged.
(See e.g. 'rpm -qpi results/vazirmatn-rd-fonts-32.101-2.fc37.noarch.rpm'.)

The %description texts all have an extra empty newline at the top. Please add a backslash
everywhere, e.g.:
- %global fontdescription0  %{expand:
+ %global fontdescription0  %{expand:\

So… the %description is actually not very useful to the user, because they don't care
about development history and the build process is managed by you (the maintainer).
The description should just say what the font is. Something like "This package provides
a simple and legible typeface originally intended for for web pages and applications, but
suitable for all uses. It provides full coverage of … and is characterized by ….".
Generally, this is a place to advertise the package a bit, i.e. list the good things
that the user might care about.

I installed the font and it seems to show up properly and looks fine. But I can't read
it, so that doesn't mean too much.

Comment 14 Hedayat Vatankhah 2022-05-28 20:58:26 UTC
Thanks for the notes. I'll try to upload a new version soon. 

About the description, I agree with you. I actually decided to go with the author's description; but you are correct and I'll update it.

Comment 15 Hedayat Vatankhah 2022-06-02 18:56:51 UTC
Updated package:

SPEC: https://hedayat.fedorapeople.org/reviews/vazirmatn-fonts.spec
SRPM: https://kojipkgs.fedoraproject.org//work/tasks/1921/87811921/vazirmatn-fonts-32.101-3.fc37.src.rpm
Koji Build: https://koji.fedoraproject.org/koji/taskinfo?taskID=87811920

I decided to not use rpmautospec, since it seems to be that using it outside Fedora scm doesn't make much sense. I'm OK with moving to use it after the package is accepted in the repos, putting all changelog entries up to the time into the changelog file and using rpmautospec with appropriate starting release number.

I fixed the package descriptions. I should note that using '\' after expand doesn't work; so I moved %{common_description} right after the expand macro. I'll probably create a PR for Fedora font templates to fix this bug in them.

Comment 16 Zbigniew Jędrzejewski-Szmek 2022-06-03 08:54:02 UTC
> This meta-package installs all the font packages, generated from the

Please drop the comma.

===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
OFL

[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "SIL Open Font License 1.1", "*No
     copyright* SIL Open Font License 1.1". 316 files have unknown license.
     Detailed output of licensecheck in /var/tmp/2081539-vazirmatn-
     fonts/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: Package contains no bundled libraries without FPC exception.
[-]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 614400 bytes in 36 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

rpmlint:
checks: 32, packages: 14
vazirmatn-fonts-all.noarch: W: no-documentation

Package is APPROVED.

Comment 17 Hedayat Vatankhah 2022-06-03 09:18:07 UTC
Thanks a lot for doing the review. However, about this:

>> This meta-package installs all the font packages, generated from the

>Please drop the comma.

This is not mine, it comes from font rpm macros:

https://pagure.io/fonts-rpm-macros/blob/main/f/rpm/lua/srpm/fonts.lua#_164

(Surprisingly, the string differs a little. The string has been change about 2 years ago in this[1] commit, but it has not hit Fedora repos yet.). 
Looks like both upstream fedora-rpm-macros and corresponding package in Fedora.


[1] https://pagure.io/fonts-rpm-macros/c/a60b1d2c0216808e67f7d597583cc7407fa83c03

Comment 18 Hedayat Vatankhah 2022-06-03 09:19:37 UTC
> Looks like both upstream fedora-rpm-macros and corresponding package in Fedora.

Oops, "Looks like both upstream fedora-rpm-macros and the corresponding package in Fedora need some love".

Comment 19 Gwyn Ciesla 2022-06-03 14:14:57 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/vazirmatn-fonts


Note You need to log in before you can comment on or make changes to this bug.