Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating STAT table in Reem-Kufi #3602

Merged
merged 3 commits into from Aug 26, 2021
Merged

Updating STAT table in Reem-Kufi #3602

merged 3 commits into from Aug 26, 2021

Conversation

aaronbell
Copy link
Collaborator

This is a straight replacement of the existing Spartan font in the GF repository to resolve STAT-table related issues.

The build process in the upstream repro is rather complex, so it seemed better to directly update the font in GF to resolve the issue. Version bumped to 1.001.

@aaronbell
Copy link
Collaborator Author

Fontbakery report

Fontbakery version: 0.7.16

[2] Family checks
🔥 FAIL: Do we have the latest version of FontBakery installed?
WARN: Is the command `ftxvalidator` (Apple Font Tool Suite) available?
--- Rationale ---

There's no reasonable (and legal) way to run the command `ftxvalidator` of the
Apple Font Tool Suite on a non-macOS machine. I.e. on GNU+Linux or Windows etc.

If Font Bakery is not running on an OSX machine, the machine running Font
Bakery could access `ftxvalidator` on OSX, e.g. via ssh or a remote procedure
call (rpc).

There's an ssh example implementation at:
https://github.com/googlefonts/fontbakery/blob/master/prebuilt/workarounds/ftxvalidator/ssh-implementation/ftxvalidator


  • WARN ftxvalidator is not available.

[12] ReemKufi[wght].ttf
🔥 FAIL: Does DESCRIPTION file mention when a family is available as variable font?
--- Rationale ---

Families with variable fonts do not always mention that in their descriptions.
Therefore, this check ensures that a standard boilerplate sentence is present
in the DESCRIPTION.en_us.html files for all those families which are available
as variable fonts.


  • 🔥 FAIL Please mention in the DESCRIPTION.en-us.html that the family is a variable font. This check expects the words 'variable font' to be present in the text e.g 'This font is now available as a variable font.' [code: should-mention-varfonts]
🔥 FAIL: Check copyright namerecords match license file.
  • com.google.fonts/check/name/license

  • 🔥 FAIL License file OFL.txt exists but NameID 13 (LICENSE DESCRIPTION) value on platform 3 (WINDOWS) is not specified for that. Value was: "This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: https://scripts.sil.org/OFL" Must be changed to "This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: http://scripts.sil.org/OFL" [code: wrong]

🔥 FAIL: Copyright notices match canonical pattern in METADATA.pb
🔥 FAIL: Copyright notices match canonical pattern in fonts
🔥 FAIL: Font enables smart dropout control in "prep" table instructions?
--- Rationale ---

This setup is meant to ensure consistent rendering quality for fonts across all
devices (with different rendering/hinting capabilities).

Below is the snippet of instructions we expect to see in the fonts:
B8 01 FF    PUSHW 0x01FF
85          SCANCTRL (unconditinally turn on
                      dropout control mode)
B0 04       PUSHB 0x04
8D          SCANTYPE (enable smart dropout control)

"Smart dropout control" means activating rules 1, 2 and 5:
Rule 1: If a pixel's center falls within the glyph outline,
        that pixel is turned on.
Rule 2: If a contour falls exactly on a pixel's center,
        that pixel is turned on.
Rule 5: If a scan line between two adjacent pixel centers
        (either vertical or horizontal) is intersected
        by both an on-Transition contour and an off-Transition
        contour and neither of the pixels was already turned on
        by rules 1 and 2, turn on the pixel which is closer to
        the midpoint between the on-Transition contour and
        off-Transition contour. This is "Smart" dropout control.

For more detailed info (such as other rules not enabled in this snippet),
please refer to the TrueType Instruction Set documentation.


  • 🔥 FAIL The 'prep' table does not contain TrueType instructions enabling smart dropout control. To fix, export the font with autohinting enabled, or run ttfautohint on the font, or run the gftools fix-nonhinting script. [code: lacks-smart-dropout]
🔥 FAIL: A static fonts directory with at least two fonts must accompany variable fonts
--- Rationale ---

Variable font family directories kept in the google/fonts git repo must include
a static/ subdir containing static fonts.
These files are meant to be served for users that still lack support for
variable fonts in their web browsers.


  • 🔥 FAIL Please create a subdirectory called "static/" and include in it static font files. [code: missing]
🔥 FAIL: Checking OS/2 usWinAscent & usWinDescent.
--- Rationale ---

A font's winAscent and winDescent values should be greater than the head
table's yMax, abs(yMin) values. If they are less than these values, clipping
can occur on Windows platforms
(https://github.com/RedHatBrand/Overpass/issues/33).

If the font includes tall/deep writing systems such as Arabic or Devanagari,
the winAscent and winDescent can be greater than the yMax and abs(yMin) to
accommodate vowel marks.

When the win Metrics are significantly greater than the upm, the linespacing
can appear too loose. To counteract this, enabling the OS/2 fsSelection bit 7
(Use_Typo_Metrics), will force Windows to use the OS/2 typo values instead.
This means the font developer can control the linespacing with the typo values,
whilst avoiding clipping by setting the win values to values greater than the
yMax and abs(yMin).


  • 🔥 FAIL OS/2.usWinDescent value 500 is too large. It should be less than double the yMin. Current absolute yMin value is 239 [code: descent]
🔥 FAIL: Are there unwanted tables?
--- Rationale ---

Some font editors store source data in their own SFNT tables, and these can
sometimes sneak into final release files, which should only have OpenType spec
tables.


They can be removed by using fonttools/ttx.

🔥 FAIL: Does the font have a DSIG table?
--- Rationale ---

Microsoft Office 2013 and below products expect fonts to have a digital
signature declared in a DSIG table in order to implement OpenType features. The
EOL date for Microsoft Office 2013 products is 4/11/2023. This issue does not
impact Microsoft Office 2016 and above products. 

This checks verifies that this signature is available in the font.

A fake signature is enough to address this issue. If needed, a dummy table can
be added to the font with the `gftools fix-dsig` script available at
https://github.com/googlefonts/gftools

Reference: https://github.com/googlefonts/fontbakery/issues/1845


  • 🔥 FAIL This font lacks a digital signature (DSIG table). Some applications may require one (even if only a dummy placeholder) in order to work properly. You can add a DSIG table by running the gftools fix-dsig script. [code: lacks-signature]
WARN: Description strings in the name table must not exceed 200 characters.
--- Rationale ---

An old FontLab version had a bug which caused it to store copyright notices in
nameID 10 entries.

In order to detect those and distinguish them from actual legitimate usage of
this name table entry, we expect that such strings do not exceed a reasonable
length of 200 chars.

Longer strings are likely instances of the FontLab bug.


  • WARN A few name table entries with ID=10 (NameID.DESCRIPTION) are longer than 200 characters. Please check whether those entries are copyright notices mistakenly stored in the description string entries by a bug in an old FontLab version. If that's the case, then such copyright notices must be removed from these entries. [code: too-long]
WARN: METADATA.pb: Fontfamily is listed on Google Fonts API?
WARN: Stricter unitsPerEm criteria for Google Fonts.
--- Rationale ---

Even though the OpenType spec allows unitsPerEm to be any value between 16 and
16384, the Google Fonts project aims at a narrower set of reasonable values.

The spec suggests usage of powers of two in order to get some performance
improvements on legacy renderers, so those values are acceptable.

But value of 500 or 1000 are also acceptable, with the added benefit that it
makes upm math easier for designers, while the performance hit of not using a
power of two is most likely negligible nowadays.

Another acceptable value is 2000. Since TT outlines are all integers (no
floats), then instances in a VF suffer rounding compromises, and therefore a
1000 UPM is to small because it forces too many such compromises.

Therefore 2000 is a good 'new VF standard', because 2000 is a simple 2x
conversion from existing fonts drawn on a 1000 UPM, and anyone who knows what
10 units can do for 1000 UPM will know what 20 units does too.

Additionally, values above 2048 would result in filesize increases with not
much added benefit.


  • WARN Even though unitsPerEm (1000) in this font is reasonable. It is strongly advised to consider changing it to 2000, since it will likely improve the quality of Variable Fonts by avoiding excessive rounding of coordinates on interpolations. [code: legacy-value]

Summary

💔 ERROR 🔥 FAIL ⚠ WARN 💤 SKIP ℹ INFO 🍞 PASS 🔎 DEBUG
0 10 4 37 7 105 0
0% 6% 2% 23% 4% 64% 0%

Note: The following loglevels were omitted in this report:

  • SKIP
  • INFO
  • PASS
  • DEBUG

@aaronbell
Copy link
Collaborator Author

FAILS here follow the previous version of the font. No changes except to the STAT table (and associated naming) were made to the file.

@khaledhosny
Copy link
Contributor

The build process in the upstream repro is rather complex

It is just a Makefile that calls fontmake.

@aaronbell
Copy link
Collaborator Author

Well, you yourself called it complicated when justifying not fixing the STAT table issues that were called out previously. I’m just following your lead :).

Furthermore, from that thread, I didn’t get the sense that you would be open to my modifying your build process to correctly generate the STAT table, so felt it better left alone until fontmake generates the STAT table automatically. If that is not the case please let me know.

Else this PR correct the issue as it currently stands.

@khaledhosny
Copy link
Contributor

Fair enough. I’m open to modifications that does not require additional dependencies, basically if fontmake output is wrong fontmake should be fixed instead of patching every font project to work around it.

@khaledhosny
Copy link
Contributor

Also I’m probably reluctant because it is not clear to me what are we fixing here, it seems like a workaround for a software bug and I’m generally not interested in these.

@aaronbell
Copy link
Collaborator Author

aaronbell commented Aug 1, 2021

@khaledhosny The core problem is that at current fontmake does not produce a real STAT table—it just generates an empty one. This is in violation of the OpenType 1.8 spec ("A style attributes table is required in all variable fonts.") and needs to be fixed. It also happens that any software application that relies on the STAT table for any reason will fail to correctly enumerate the variable instances contained in the font.

Yes, I realize that fontmake (and specifically varlib) should be producing this table, and I know you're aware of those discussions as I've seen you comment on near all of them :). However, in the short term, Google Fonts is shipping a font that has to be fixed. To that end, gftools has added helpful tools to get around the current limitations such as gen-stat which solves this issue.

If you don't want to explicitly add gftools into your build process, there's two options:

  1. Convert your build process to UFR format which will manage the entire build process for you. You can do the merger of the glyphs files as a pre-processing step, then run the resultant glyphs master through the UFR Makefile, etc. where you don't have to think about it anymore. And since it produces its own venv at runtime (especially the CLI part), it can remove any post-processing fixes once fontmake does what it should be doing. If you'd like, I can help get this up and running.

  2. Wait until fontmake produces the table itself, and any time that you want to PR an update to Google Fonts, run the gftools post processing step manually before submitting.

Either way, it'll ensure that GF has a valid font with a correct STAT table.

@khaledhosny
Copy link
Contributor

khaledhosny commented Aug 1, 2021

it just generates an empty one. This is in violation of the OpenType 1.8 spec ("A style attributes table is required in all variable fonts.") and needs to be fixed.

But the STAT table in Reem Kufi is not empty:

  <STAT>
    <Version value="0x00010001"/>
    <DesignAxisRecordSize value="8"/>
    <!-- DesignAxisCount=1 -->
    <DesignAxisRecord>
      <Axis index="0">
        <AxisTag value="wght"/>
        <AxisNameID value="256"/>  <!-- Weight -->
        <AxisOrdering value="0"/>
      </Axis>
    </DesignAxisRecord>
    <!-- AxisValueCount=0 -->
    <ElidedFallbackNameID value="2"/>  <!-- Regular -->
  </STAT>

It contains an Axis Record which the spec indeed requires:

In a variable font, there must be an axis record for every axis defined in the 'fvar' table, and it must use the same name ID used in the 'fvar' table. The order of axis records in the STAT table is arbitrary and does not need to match the order of records in the 'fvar' table.

It does not contain any Axis Values, but the spec does not require them:

In a variable font, every element of typographic subfamily names for all of the named instances defined in the 'fvar' table should be reflected in an axis value table.

(emphasis mine)

So the font is spec complaint as far as I can tell, but I'm happy to learn otherwise.

@aaronbell
Copy link
Collaborator Author

OK, I overstepped in saying it is non-compliant by the letter of the document. However, your STAT still does not accommodate the spirit of the document, which is to say how the STAT table can be used:

An axis value table can provide a string label for a specific axis value on any axis that is relevant for the font or font family. (For special cases, an axis value table can also provide a label for a combination of values from a set of of relevant axes.) These labels, together with the typographic family name (name ID 16), can be used to compose alternate names dynamically to fit the requirements of different font family models.

There is no way for an application that attempts, like above, to dynamically generate instance names from the STAT table, to do so from your STAT table. The only record you have provided is "Regular", so everything becomes Regular:

115887147-f08cd600-a451-11eb-86ec-63357d998157

This is not a workable situation.

@khaledhosny
Copy link
Contributor

The information in the STAT table Axis Values will just duplicate what is in fvar table, which is what a sensible application/library would use:

$ fc-list | grep Reem
~/Library/Fonts/ReemKufi.otf: Reem Kufi:style=Regular
~/Library/Fonts/ReemKufi.otf: Reem Kufi:style=Bold
~/Library/Fonts/ReemKufi.otf: Reem Kufi:style=Medium
~/Library/Fonts/ReemKufi.otf: Reem Kufi
~/Library/Fonts/ReemKufi.otf: Reem Kufi:style=SemiBold

@aaronbell
Copy link
Collaborator Author

Feel free to do what you want in your own repository but for the purposes of the version on google fonts, the full axis instance values must be present in the STAT table to ensure consistent enumeration across applications.

@thlinard
Copy link
Contributor

thlinard commented Aug 2, 2021

It does not contain any Axis Values, but the spec does not require them:

In a variable font, every element of typographic subfamily names for all of the named instances defined in the 'fvar' table should be reflected in an axis value table.

(emphasis mine)

OK, literally speaking, you're right. Should isn't must. But I agree with @aaronbell, for my part, this is not what I perceive from the spirit of the specs.

@tiroj
Copy link

tiroj commented Aug 2, 2021

Maybe ping Peter Constable or request clarification of the spec in an MS typography issue?

@thlinard
Copy link
Contributor

thlinard commented Aug 2, 2021

It would indeed be a good thing if someone well placed at Microsoft could give their opinion on this, because one of the first implementations of a use of the STAT table, Microsoft Office for Mac, clearly chose to interpret the "should" in question as a "must".

I find that this is sufficient to merit clarification in the specs.

@felipesanches
Copy link
Collaborator

Font Bakery version 0.7.16 was released in December 2019!!!
https://github.com/googlefonts/fontbakery/blob/main/CHANGELOG.md#0716-2019-dec-13

ouch

There's been 23 releases since then, with lots of bug fixes, new checks and changes in checking criteria. :-)

I don't know why this font is being checked nowadays using such an old version of Font Bakery, but this should be the very first thing to address before looking at any other check result.

Note: I also see that one of the check results is actually trying to ensure you use the latest version.

Screenshot from 2021-08-03 04-38-02

@m4rc1e
Copy link
Collaborator

m4rc1e commented Aug 3, 2021

@felipesanches yeah it's strange. Other PRs are pulling the latest release, #3582 (comment).

@RosaWagner
Copy link
Contributor

This one has been inserted manually since the gh action failed with the diff. We should arrange the gh action for the FB report to show even if there are issues with browserstack.

@khaledhosny
Copy link
Contributor

I convinced myself to اعصر على نفسي لمونة and add axis value to STAT table and postScriptNameID to fvar instances. This is in Reem Kufi main branch now.

@thlinard
Copy link
Contributor

thlinard commented Aug 5, 2021

Glad to read this! (hope it doesn't hurt too much!)

But I would still be happy to read what @PeterConstable could comment on on this particular point of the OT specs (shouldn't the "should" be replaced by a "must", for clarification?).

@davelab6
Copy link
Member

davelab6 commented Aug 5, 2021

Thanks @khaledhosny!!!

So I guess the next step is for @aaronbell to pull your latest upstream and check it with latest FB and hopefully PR to GF :)

(I am not sure which account should be used, @PeterConstable or @PeterCon)

@RosaWagner
Copy link
Contributor

@aaronbell since Khaled agreed on that, can you pull the lastest version upstream? so we don't have dangerous hotfixes here

@PeterConstable
Copy link

It would indeed be a good thing if someone well placed at Microsoft could give their opinion on this, because one of the first implementations of a use of the STAT table, Microsoft Office for Mac, clearly chose to interpret the "should" in question as a "must".

I find that this is sufficient to merit clarification in the specs.

The "spirit" of what was intended by the spec was noted: to allow variable fonts to work better in existing applications (which are numerous) that don't understand an open-ended font family model. IOW, to avoid issues that could look very busted for users, such as named instances that were advertised not being available; or named instances appearing to be available but when selected resulting in text from a different instance; etc.

The information in the STAT table Axis Values will just duplicate what is in fvar table,

In a specific case, perhaps. But in the general case, no. It would have been harder and more prone to error to try to call out when it might not be needed.

Some changes in the STAT spec in regard to requirements ("must") or recommendations ("should") might be warranted. I'm inclined to be cautious, though. It's five years since the scenarios and details that led to the current spec were fresh in mind, and I wouldn't want to impose requirements if there are valid scenarios in which that might not be needed.

It's conceivable that someone might create a font to be used in a closed context in which Axis Value Tables weren't needed for correct support. For that situation, "should be reflected in an axis value table" rather than "must" seems appropriate. But then, for that scenario, was it necessary to require the STAT table at all?

"A style attributes table is required in all variable fonts."

Perhaps that could have been made a recommendation rather than requirement?

I do know there are implementations that use the STAT table even for non-variable fonts, and even for purposes beyond the original design intent.

If folk think the STAT spec should be changed, then please post feedback on the STAT page.

@PeterConstable
Copy link

On the "should" vs. "must" topic, @aaronbell also opened an issue in MS' typography-issues, and I've added comments there.

@aaronbell
Copy link
Collaborator Author

Thanks all. I've updated the files here to the official release version from @khaledhosny's repro. Thanks so much for your willingness to be flexible on this!

@gf-bot
Copy link

gf-bot commented Aug 9, 2021

Fontbakery report

Fontbakery version: 0.8.0

[1] Family checks
WARN: Is the command `ftxvalidator` (Apple Font Tool Suite) available?
--- Rationale ---
There's no reasonable (and legal) way to run the command `ftxvalidator` of the
Apple Font Tool Suite on a non-macOS machine. I.e. on GNU+Linux or Windows etc.
If Font Bakery is not running on an OSX machine, the machine running Font Bakery
could access `ftxvalidator` on OSX, e.g. via ssh or a remote procedure call
(rpc).
There's an ssh example implementation at:
https://github.com/googlefonts/fontbakery/blob/main/prebuilt/workarounds
/ftxvalidator/ssh-implementation/ftxvalidator
  • WARN Could not find ftxvalidator. [code: ftxvalidator-available]

[12] ReemKufi[wght].ttf
🔥 FAIL: Checks METADATA.pb font.post_script_name matches postscript name declared on the name table.
🔥 FAIL: METADATA.pb font.full_name value matches fullname declared on the name table?
🔥 FAIL: METADATA.pb font.name and font.full_name fields match the values declared on the name table?
🔥 FAIL: Copyright field for this font on METADATA.pb matches all copyright notice entries on the name table ?
🔥 FAIL: Font enables smart dropout control in "prep" table instructions?
--- Rationale ---
This setup is meant to ensure consistent rendering quality for fonts across all
devices (with different rendering/hinting capabilities).
Below is the snippet of instructions we expect to see in the fonts:
B8 01 FF    PUSHW 0x01FF
85          SCANCTRL (unconditinally turn on
                      dropout control mode)
B0 04       PUSHB 0x04
8D          SCANTYPE (enable smart dropout control)
"Smart dropout control" means activating rules 1, 2 and 5:
Rule 1: If a pixel's center falls within the glyph outline,
        that pixel is turned on.
Rule 2: If a contour falls exactly on a pixel's center,
        that pixel is turned on.
Rule 5: If a scan line between two adjacent pixel centers
        (either vertical or horizontal) is intersected
        by both an on-Transition contour and an off-Transition
        contour and neither of the pixels was already turned on
        by rules 1 and 2, turn on the pixel which is closer to
        the midpoint between the on-Transition contour and
        off-Transition contour. This is "Smart" dropout control.
For more detailed info (such as other rules not enabled in this snippet), please
refer to the TrueType Instruction Set documentation.
  • 🔥 FAIL The 'prep' table does not contain TrueType instructions enabling smart dropout control. To fix, export the font with autohinting enabled, or run ttfautohint on the font, or run the gftools fix-nonhinting script. [code: lacks-smart-dropout]
🔥 FAIL: METADATA.pb: Designer is listed with the correct name on the Google Fonts catalog of designers?
🔥 FAIL: Ensure variable fonts include an avar table.
--- Rationale ---
Most variable fonts should include an avar table to correctly define axes
progression rates.
For example, a weight axis from 0% to 100% doesn't map directly to 100 to 1000,
because a 10% progression from 0% may be too much to define the 200, while 90%
may be too little to define the 900.
If the progression rates of axes is linear, this check can be ignored. Fontmake
will also skip adding an avar table if the progression rates are linear.
However, we still recommend designers visually proof each instance is at the
desired weight, width etc.
  • 🔥 FAIL This variable font does not have an avar table. [code: missing-avar]
🔥 FAIL: Are there unwanted tables?
--- Rationale ---
Some font editors store source data in their own SFNT tables, and these can
sometimes sneak into final release files, which should only have OpenType spec
tables.

They can be removed with the gftools fix-unwanted-tables script. [code: unwanted-tables]

🔥 FAIL: Does the font have a DSIG table?
--- Rationale ---
Microsoft Office 2013 and below products expect fonts to have a digital
signature declared in a DSIG table in order to implement OpenType features. The
EOL date for Microsoft Office 2013 products is 4/11/2023. This issue does not
impact Microsoft Office 2016 and above products.
This checks verifies that this signature is available in the font.
A fake signature is enough to address this issue. If needed, a dummy table can
be added to the font with the `gftools fix-dsig` script available at
https://github.com/googlefonts/gftools
Reference: https://github.com/googlefonts/fontbakery/issues/1845
  • 🔥 FAIL This font lacks a digital signature (DSIG table). Some applications may require one (even if only a dummy placeholder) in order to work properly. You can add a DSIG table by running the gftools fix-dsig script. [code: lacks-signature]
WARN: Description strings in the name table must not exceed 200 characters.
--- Rationale ---
An old FontLab version had a bug which caused it to store copyright notices in
nameID 10 entries.
In order to detect those and distinguish them from actual legitimate usage of
this name table entry, we expect that such strings do not exceed a reasonable
length of 200 chars.
Longer strings are likely instances of the FontLab bug.
  • WARN A few name table entries with ID=10 (NameID.DESCRIPTION) are longer than 200 characters. Please check whether those entries are copyright notices mistakenly stored in the description string entries by a bug in an old FontLab version. If that's the case, then such copyright notices must be removed from these entries. [code: too-long]
WARN: Ensure fonts have ScriptLangTags declared on the 'meta' table.
--- Rationale ---
The OpenType 'meta' table originated at Apple. Microsoft added it to OT with
just two DataMap records:
- dlng: comma-separated ScriptLangTags that indicate which scripts, or languages
and scripts, with possible variants, the font is designed for
- slng: comma-separated ScriptLangTags that indicate which scripts, or languages
and scripts, with possible variants, the font supports
The slng structure is intended to describe which languages and scripts the font
overall supports. For example, a Traditional Chinese font that also contains
Latin characters, can indicate Hant,Latn, showing that it supports Hant, the
Traditional Chinese variant of the Hani script, and it also supports the Latn
script
The dlng structure is far more interesting. A font may contain various glyphs,
but only a particular subset of the glyphs may be truly "leading" in the design,
while other glyphs may have been included for technical reasons. Such a
Traditional Chinese font could only list Hant there, showing that it’s designed
for Traditional Chinese, but the font would omit Latn, because the developers
don’t think the font is really recommended for purely Latin-script use.
The tags used in the structures can comprise just script, or also language and
script. For example, if a font has Bulgarian Cyrillic alternates in the locl
feature for the cyrl BGR OT languagesystem, it could also indicate in dlng
explicitly that it supports bul-Cyrl. (Note that the scripts and languages in
meta use the ISO language and script codes, not the OpenType ones).
This check ensures that the font has the meta table containing the slng and dlng
structures.
All families in the Google Fonts collection should contain the 'meta' table.
Windows 10 already uses it when deciding on which fonts to fall back to. The
Google Fonts API and also other environments could use the data for smarter
filtering. Most importantly, those entries should be added to the Noto fonts.
In the font making process, some environments store this data in external files
already. But the meta table provides a convenient way to store this inside the
font file, so some tools may add the data, and unrelated tools may read this
data. This makes the solution much more portable and universal.
  • WARN This font file does not have a 'meta' table. [code: lacks-meta-table]
WARN: Font contains '.notdef' as its first glyph?
--- Rationale ---
The OpenType specification v1.8.2 recommends that the first glyph is the
'.notdef' glyph without a codepoint assigned and with a drawing.
https://docs.microsoft.com/en-us/typography/opentype/spec
/recom#glyph-0-the-notdef-glyph
Pre-v1.8, it was recommended that fonts should also contain 'space', 'CR' and
'.null' glyphs. This might have been relevant for MacOS 9 applications.
  • WARN Glyph '.notdef' should contain a drawing, but it is empty. [code: empty]

Summary

💔 ERROR 🔥 FAIL ⚠ WARN 💤 SKIP ℹ INFO 🍞 PASS 🔎 DEBUG
0 9 4 49 9 142 0
0% 4% 2% 23% 4% 67% 0%

Note: The following loglevels were omitted in this report:

  • SKIP
  • INFO
  • PASS
  • DEBUG

@gf-bot
Copy link

gf-bot commented Aug 9, 2021

Fontbakery report

Fontbakery version: 0.8.0

[1] Family checks
WARN: Is the command `ftxvalidator` (Apple Font Tool Suite) available?
--- Rationale ---
There's no reasonable (and legal) way to run the command `ftxvalidator` of the
Apple Font Tool Suite on a non-macOS machine. I.e. on GNU+Linux or Windows etc.
If Font Bakery is not running on an OSX machine, the machine running Font Bakery
could access `ftxvalidator` on OSX, e.g. via ssh or a remote procedure call
(rpc).
There's an ssh example implementation at:
https://github.com/googlefonts/fontbakery/blob/main/prebuilt/workarounds
/ftxvalidator/ssh-implementation/ftxvalidator
  • WARN Could not find ftxvalidator. [code: ftxvalidator-available]

[5] ReemKufi[wght].ttf
🔥 FAIL: METADATA.pb: Designer is listed with the correct name on the Google Fonts catalog of designers?
🔥 FAIL: Ensure variable fonts include an avar table.
--- Rationale ---
Most variable fonts should include an avar table to correctly define axes
progression rates.
For example, a weight axis from 0% to 100% doesn't map directly to 100 to 1000,
because a 10% progression from 0% may be too much to define the 200, while 90%
may be too little to define the 900.
If the progression rates of axes is linear, this check can be ignored. Fontmake
will also skip adding an avar table if the progression rates are linear.
However, we still recommend designers visually proof each instance is at the
desired weight, width etc.
  • 🔥 FAIL This variable font does not have an avar table. [code: missing-avar]
WARN: Description strings in the name table must not exceed 200 characters.
--- Rationale ---
An old FontLab version had a bug which caused it to store copyright notices in
nameID 10 entries.
In order to detect those and distinguish them from actual legitimate usage of
this name table entry, we expect that such strings do not exceed a reasonable
length of 200 chars.
Longer strings are likely instances of the FontLab bug.
  • WARN A few name table entries with ID=10 (NameID.DESCRIPTION) are longer than 200 characters. Please check whether those entries are copyright notices mistakenly stored in the description string entries by a bug in an old FontLab version. If that's the case, then such copyright notices must be removed from these entries. [code: too-long]
WARN: Ensure fonts have ScriptLangTags declared on the 'meta' table.
--- Rationale ---
The OpenType 'meta' table originated at Apple. Microsoft added it to OT with
just two DataMap records:
- dlng: comma-separated ScriptLangTags that indicate which scripts, or languages
and scripts, with possible variants, the font is designed for
- slng: comma-separated ScriptLangTags that indicate which scripts, or languages
and scripts, with possible variants, the font supports
The slng structure is intended to describe which languages and scripts the font
overall supports. For example, a Traditional Chinese font that also contains
Latin characters, can indicate Hant,Latn, showing that it supports Hant, the
Traditional Chinese variant of the Hani script, and it also supports the Latn
script
The dlng structure is far more interesting. A font may contain various glyphs,
but only a particular subset of the glyphs may be truly "leading" in the design,
while other glyphs may have been included for technical reasons. Such a
Traditional Chinese font could only list Hant there, showing that it’s designed
for Traditional Chinese, but the font would omit Latn, because the developers
don’t think the font is really recommended for purely Latin-script use.
The tags used in the structures can comprise just script, or also language and
script. For example, if a font has Bulgarian Cyrillic alternates in the locl
feature for the cyrl BGR OT languagesystem, it could also indicate in dlng
explicitly that it supports bul-Cyrl. (Note that the scripts and languages in
meta use the ISO language and script codes, not the OpenType ones).
This check ensures that the font has the meta table containing the slng and dlng
structures.
All families in the Google Fonts collection should contain the 'meta' table.
Windows 10 already uses it when deciding on which fonts to fall back to. The
Google Fonts API and also other environments could use the data for smarter
filtering. Most importantly, those entries should be added to the Noto fonts.
In the font making process, some environments store this data in external files
already. But the meta table provides a convenient way to store this inside the
font file, so some tools may add the data, and unrelated tools may read this
data. This makes the solution much more portable and universal.
  • WARN This font file does not have a 'meta' table. [code: lacks-meta-table]
WARN: Font contains '.notdef' as its first glyph?
--- Rationale ---
The OpenType specification v1.8.2 recommends that the first glyph is the
'.notdef' glyph without a codepoint assigned and with a drawing.
https://docs.microsoft.com/en-us/typography/opentype/spec
/recom#glyph-0-the-notdef-glyph
Pre-v1.8, it was recommended that fonts should also contain 'space', 'CR' and
'.null' glyphs. This might have been relevant for MacOS 9 applications.
  • WARN Glyph '.notdef' should contain a drawing, but it is empty. [code: empty]

Summary

💔 ERROR 🔥 FAIL ⚠ WARN 💤 SKIP ℹ INFO 🍞 PASS 🔎 DEBUG
0 2 4 49 9 149 0
0% 1% 2% 23% 4% 70% 0%

Note: The following loglevels were omitted in this report:

  • SKIP
  • INFO
  • PASS
  • DEBUG

@khaledhosny
Copy link
Contributor

khaledhosny commented Aug 10, 2021

I see you removed the MVAR table, but it is a useful table to have and fontbakery shouldn’t be rejecting it.

@khaledhosny
Copy link
Contributor

@aaronbell
Copy link
Collaborator Author

but it is a useful table to have and fontbakery shouldn’t be rejecting it.

Yes, I know it is a useful table, but the current GF requirement is to strip it. I’m glad that they’ll be revisiting that check and may update it in the future. When they do so I’m sure it’ll be added to many fonts :)

@khaledhosny
Copy link
Contributor

I usually ignore such unreasonable requirements.

@PeterConstable
Copy link

Rejecting MVAR and failing (as opposed to warning) if there is no 'avar'---both seem wrong.

@RosaWagner RosaWagner removed the -- Needs manager's opinion from upper level label Aug 18, 2021
@RosaWagner RosaWagner merged commit e3db990 into main Aug 26, 2021
@RosaWagner RosaWagner deleted the reem-kufi branch August 26, 2021 14:36
@felipesanches
Copy link
Collaborator

Rejecting MVAR and failing (as opposed to warning) if there is no 'avar'---both seem wrong.

@PeterConstable, the check that used to reject MVAR was modified not to do so anymore.

Failing on missing avar table is a googlefonts-specific policy defined by @davelab6. For the universal profile there's no such FAIL, though.

@PeterCon
Copy link

An 'avar' table isn't required for OT conformance, and might not be required for a given design, but it's harmless to add an 'avar' table that does nothing in that case.

@RosaWagner RosaWagner added --- Live Font is visible on API and removed --- to_production labels Nov 5, 2021
@RosaWagner RosaWagner added I Small Fix bugs fixed but nothing added and removed I Font Upgrade labels Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
--- Live Font is visible on API I Small Fix bugs fixed but nothing added
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet