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

Font downloading issues #200

Open
maxirmx opened this issue May 12, 2023 · 7 comments
Open

Font downloading issues #200

maxirmx opened this issue May 12, 2023 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@maxirmx
Copy link

maxirmx commented May 12, 2023

Transfered from an issue in fontist repository
The tail of discussion follows

@maxirmx
Copy link
Author

maxirmx commented May 12, 2023

From @maxirmx

  • The error log @abunashir referenced in the original message came from mn2pdf. It is not fontist.
  • I believe that handling of negative scenarios there can be improved. Cases like "could not download file" or "could not unzip file" etc. I looks like that such error are handled locally in mn2pdf/Util.js but not propagated updtream. I guess it requires some kind of design decision. For example, what would we like to do if the file failed to download - "fail globally", "retry", "retry N times", "ask user" .... ?

@maxirmx
Copy link
Author

maxirmx commented May 12, 2023

From @ronaldtse

Yes we should move the task to mn2pdf. I think it possible mn2pdf should not manage fonts itself but rely on Fontist.

@Intelligent2013
Copy link
Contributor

Intelligent2013 commented Jun 14, 2023

To do:

  • remove fonts downloading (STIX Two Math, Noto fonts)
  • set fontist manifest file path parameter as mandatory
  • add STIX Two Math and Noto fonts into each metanorma gem (processor.rb)

@Intelligent2013
Copy link
Contributor

set fontist manifest file path parameter as mandatory

No need to do this. Just enough to set default font path to ~/.fontist.

add STIX Two Math and Noto fonts into each metanorma gem (processor.rb)

  • BIPM, JCGM:

    • Times New Roman,
    • STIX Two Math,
    • Noto Serif fonts (see list below),
    • Courier New
    • Noto Sans monospace fonts (see list below)
  • BSI:

    • Cambria
    • Times New Roman
    • Cambria Math
    • Noto Serif fonts (see list below),
    • Courier New
    • Noto Sans monospace fonts (see list below)
  • CSA:

    • Azo Sans,
    • STIX Two Math,
    • Noto Sans fonts (see list below),
    • Noto Sans monospace fonts (see list below)
  • CSD:

    • Noto Sans fonts (see list below),
    • STIX Two Math
    • Noto Sans monospace fonts (see list below)
  • IEC:

    • Arial,
    • Times New Roman,
    • STIX Two Math,
    • Noto Sans fonts (see list below),
    • Courier New
    • Noto Sans monospace fonts (see list below)
  • IEEE:

    • Times New Roman,
    • STIX Two Math,
    • Noto Serif fonts (see list below),
    • Courier New
    • Noto Sans monospace fonts (see list below)
  • IHO:

    • Arial,
    • Cambria Math,
    • Noto Sans fonts (see list below),
    • Fira Code
    • Noto Sans monospace fonts (see list below)
  • ISO:

    • Cambria,
    • Times New Roman,
    • Cambria Math,
    • Noto Serif fonts (see list below),
    • Courier New
    • Noto Sans monospace fonts (see list below)
  • ITU:

    • Times New Roman,
    • STIX Two Math,
    • Noto Serif fonts (see list below),
    • Courier New
    • Noto Sans monospace fonts (see list below)
  • JIS:

    • IPAexMincho,
    • STIX Two Math,
    • Noto Serif fonts (see list below),
    • Noto Sans monospace fonts (see list below)
  • M3D:

    • EB Garamond 12,
    • Noto Sans fonts (see list below),
    • Courier New
    • Noto Sans monospace fonts (see list below)
  • MPFD:

    • Arial,
    • Noto Sans fonts (see list below),
    • Noto Sans monospace fonts (see list below)
  • NIST:

    • Times New Roman,
    • STIX Two Math,
    • Noto Serif fonts (see list below),
    • Courier New
    • Noto Sans monospace fonts (see list below)
  • OGC:

    • Lato,
    • STIX Two Math,
    • Noto Sans fonts (see list below),
    • Fira Code
    • Noto Sans monospace fonts (see list below)
  • OGC White Paper:

    • Arial,
    • STIX Two Math,
    • Noto Sans fonts (see list below),
    • Courier New
    • Noto Sans monospace fonts (see list below)
  • RSD:

    • OpenSans,
    • STIX Two Math,
    • Noto Sans fonts (see list below),
    • Noto Sans monospace fonts (see list below)
  • UNECE:

    • Times New Roman,
    • STIX Two Math,
    • Noto Serif fonts (see list below),
    • Courier New
    • Noto Sans monospace fonts (see list below)

Noto Sans fonts:

  • Noto Sans,
  • Noto Sans HK,
  • Noto Sans JP,
  • Noto Sans KR,
  • Noto Sans SC,
  • Noto Sans TC

Noto Serif fonts:

  • Noto Serif
  • Noto Serif HK,
  • Noto Serif JP,
  • Noto Serif KR,
  • Noto Serif SC,
  • Noto Serif TC,

Noto Sans monospace fonts:

  • Noto Sans Mono,
  • Noto Sans Mono CJK HK,
  • Noto Sans Mono CJK JP,
  • Noto Sans Mono CJK KR,
  • Noto Sans Mono CJK SC,
  • Noto Sans Mono CJK TC

@Intelligent2013
Copy link
Contributor

For metanorma-iso:

      def fonts_manifest
        {
          "Cambria" => nil,
          "Cambria Math" => nil,
          "Times New Roman" => nil,
          "Source Han Sans" => nil,
          "Source Han Sans Normal" => nil,
          "Courier New" => nil,
          "Noto Serif" => nil,
          "Noto Serif HK" => nil,
          "Noto Serif JP" => nil,
          "Noto Serif KR" => nil,
          "Noto Serif SC" => nil,
          "Noto Serif TC" => nil,
          "Noto Sans Mono" => nil,
          "Noto Sans Mono CJK HK" => nil,
          "Noto Sans Mono CJK JP" => nil,
          "Noto Sans Mono CJK KR" => nil,
          "Noto Sans Mono CJK SC" => nil,
          "Noto Sans Mono CJK TC" => nil,
        }
      end

causes the errors:

Downloading font "google/noto_serif" from https://fonts.google.com/download?family=Noto%20Serif
Downloading: 2520% (21/0 MiB), 1.43 MiB/s, done.
SHA256 checksum mismatch for https://fonts.google.com/download?family=Noto%20Serif: 86a78ba6d1ef60feb8a8f2f9ff71ede4a59439ff7d944fa672b95ea99b6ed232, should be 7b8eddfd791131f6d3cfc29240a0c30b3c82b3bb24190a81522a4f3d58e749a4.
Installing font "google/noto_serif".
Fonts installed at:
- C:/Users/IntlUser/.fontist/fonts/NotoSerif-Bold.ttf
- C:/Users/IntlUser/.fontist/fonts/NotoSerif-BoldItalic.ttf
- C:/Users/IntlUser/.fontist/fonts/NotoSerif-Italic.ttf
- C:/Users/IntlUser/.fontist/fonts/NotoSerif-Regular.ttf
[fontist] 'Noto Serif HK' font is not supported. Please report this issue at github.com/metanorma/metanorma/issues to report this issue.

Fontist support Noto Serif CJK as Super OTC font:
https://github.com/fontist/formulas/blob/v3/Formulas/noto_serif_cjk.yml
but Apache FOP doesn't support it.

For mn2pdf (see #119 (comment)) the special package was made in https://github.com/fontist/noto-fonts

But fontist doesn't use this package.

Noto Sans Mono CJK also doesn't supported by fontist:

[fontist] 'Noto Sans Mono CJK HK' font is not supported. Please report this issue at github.com/metanorma/metanorma/issues to report this issue.

The package in https://github.com/fontist/noto-fonts contains more recent version than installed by fontist.

I'll add the tickets on metanorma repository.

@Intelligent2013
Copy link
Contributor

Intelligent2013 commented Jun 16, 2023

Metanorma gems to update:

  • metanorma-bipm
  • metanorma-bsi
  • metanorma-csa
  • metanorma-cc
  • metanorma-iec
  • metanorma-ieee
  • metanorma-iho
  • metanorma-iso
  • metanorma-itu
  • metanorma-jis
  • metanorma-m3aawg
  • metanorma-mpfa
  • metanorma-nist
  • metanorma-ogc
  • metanorma-ribose
  • metanorma-un

Intelligent2013 added a commit to metanorma/metanorma-iso that referenced this issue Jun 16, 2023
Intelligent2013 added a commit to metanorma/metanorma-bipm that referenced this issue Jun 16, 2023
Intelligent2013 added a commit to metanorma/metanorma-csa that referenced this issue Jun 16, 2023
Intelligent2013 added a commit to metanorma/metanorma-cc that referenced this issue Jun 16, 2023
Intelligent2013 added a commit to metanorma/metanorma-iec that referenced this issue Jun 16, 2023
Intelligent2013 added a commit to metanorma/metanorma-ieee that referenced this issue Jun 16, 2023
Intelligent2013 added a commit to metanorma/metanorma-iho that referenced this issue Jun 16, 2023
Intelligent2013 added a commit to metanorma/metanorma-itu that referenced this issue Jun 16, 2023
Intelligent2013 added a commit to metanorma/metanorma-jis that referenced this issue Jun 16, 2023
Intelligent2013 added a commit to metanorma/metanorma-m3aawg that referenced this issue Jun 16, 2023
Intelligent2013 added a commit to metanorma/metanorma-mpfa that referenced this issue Jun 16, 2023
Intelligent2013 added a commit to metanorma/metanorma-ogc that referenced this issue Jun 16, 2023
Intelligent2013 added a commit to metanorma/metanorma-ribose that referenced this issue Jun 16, 2023
Intelligent2013 added a commit to metanorma/metanorma-un that referenced this issue Jun 16, 2023
@Intelligent2013
Copy link
Contributor

On hold.
Next tasks after fontist issues fixing:

@Intelligent2013 Intelligent2013 moved this from 🆕 New to On hold in Metanorma Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: On hold
Development

No branches or pull requests

2 participants