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

Add support for Wingdings and Symbol fonts #70

Closed
raffaem opened this issue Dec 20, 2020 · 16 comments · Fixed by fontist/fontist#207
Closed

Add support for Wingdings and Symbol fonts #70

raffaem opened this issue Dec 20, 2020 · 16 comments · Fixed by fontist/fontist#207
Assignees

Comments

@raffaem
Copy link

raffaem commented Dec 20, 2020

I am trying to open a PDF but it says that these fonts are missing:

Symbol, Wingdings, Wingdings 2, Wingdings 3.

Are these available from fontist?

I also told me that "MT Extra" was missing but I was able to install it

@raffaem
Copy link
Author

raffaem commented Dec 20, 2020

Those fonts are available here

@ronaldtse
Copy link
Contributor

ronaldtse commented Dec 20, 2020

MT Extra is available via Fontist.

Symbol, Wingdings, Wingdings 2, Wingdings 3 are not available in Fontist. We would prefer not directly downloading the fonts from some other package on GitHub due to potential licensing concerns.

The good news is that these fonts are available from here:

Including:

  • symbol.ttf
  • wingding.ttf
  • WINGDNG2.TTF
  • WINGDNG3.TTF

Let's link to this publicly published RPM package instead.

This package is also officially mentioned by an Atlassian Confluence support article: https://confluence.atlassian.com/confkb/the-text-in-a-powerpoint-excel-or-word-document-is-missing-or-looks-different-via-confluence-view-file-macro-200213562.html

@ronaldtse
Copy link
Contributor

This package also contains:

  • WINGDNG2.TTF
  • WINGDNG3.TTF
  • andalemo.ttf
  • arial.ttf
  • arialbd.ttf
  • arialbi.ttf
  • ariali.ttf
  • ariblk.ttf
  • comic.ttf
  • comicbd.ttf
  • cour.ttf
  • courbd.ttf
  • courbi.ttf
  • couri.ttf
  • georgia.ttf
  • georgiab.ttf
  • georgiai.ttf
  • georgiaz.ttf
  • impact.ttf
  • l_10646.ttf
  • lucon.ttf
  • micross.ttf
  • symbol.ttf
  • tahoma.ttf
  • tahomabd.ttf
  • times.ttf
  • timesbd.ttf
  • timesbi.ttf
  • timesi.ttf
  • trebuc.ttf
  • trebucbd.ttf
  • trebucbi.ttf
  • trebucit.ttf
  • verdana.ttf
  • verdanab.ttf
  • verdanai.ttf
  • verdanaz.ttf
  • webdings.ttf
  • wingding.ttf

@raffaem
Copy link
Author

raffaem commented Dec 20, 2020

Good that we found a solution!

It is really important for people who comes from Windows and would like a smooth transition with Linux :)

@ronaldtse ronaldtse changed the title Missing fonts Add support for Wingdings and Symbol fonts Dec 28, 2020
@ronaldtse ronaldtse transferred this issue from fontist/fontist Dec 28, 2020
@ronaldtse
Copy link
Contributor

Moved to fontist/formula.

@raffaem
Copy link
Author

raffaem commented Dec 30, 2020

Can you also add "MS PGothic"? https://bigfontsite.com/download/ms-pgothic.html#download

@alexeymorozov
Copy link
Contributor

Would appreciate any help with cross-platform unarchiving of RPM packages. The ways I tried so far:

  1. seven_zip_ruby should support RPMs, as described here, but it fails on run.
  2. ffi-libarchive works at least on MacOS, but then it needs to install libarchive on Windows (from Chef or precompiled with fontist).
  3. arr-pm works on MacOS, but fails on Windows, since it uses the CLI xz utility.
  4. rupert could read filenames on all platforms, but seems it has no unarchiving feature.

@ronaldtse
Copy link
Contributor

ronaldtse commented Jan 6, 2021

I think the only two viable options are rupert and seven_zip_ruby. Installation of libarchive can be complex.

@alexeymorozov it seems that rupert does have some method for data reading?

https://github.com/stefanozanella/rupert/blob/f4d88c0d1d2847d6a10a00592406bce440b1ffc0/lib/rupert/rpm/entry.rb#L61-L64

Seems like we will need to first traverse the index to find the correct Entry object, then call #resolve to obtain the data, seek the correct size, and write out the necessary file manually.

@ronaldtse
Copy link
Contributor

@alexeymorozov I found this Source RPM package that can be directly un-tared, without necessary for RPM/CPIO unpacking:

https://download.opensuse.org/repositories/home:/Dead_Mozay/openSUSE_Tumbleweed/src/webcore-fonts-3.0-2.14.src.rpm

$ tar -zxvf webcore-fonts-3.0-2.14.src.rpm 
x webcore-fonts-3.0.tar.gz
x webcore-fonts.spec
$ tar -zxvf webcore-fonts-3.0.tar.gz 
x webcore-fonts/
x webcore-fonts/fonts/
x webcore-fonts/fonts/couri.ttf
x webcore-fonts/fonts/verdanaz.ttf
x webcore-fonts/fonts/cour.ttf
x webcore-fonts/fonts/arialbd.ttf
x webcore-fonts/fonts/comicbd.ttf
...

@alexeymorozov
Copy link
Contributor

alexeymorozov commented Jan 7, 2021

Thanks, Ronald! The source RPM appeared to be easier to extract from. Though still couldn't finish it.

Indeed rupert allows to extract an archive file just by reading content after a header here:

File.write("archive.cpio.gz", @raw_io.read)

The resulting file could be unarchived by GzipReader:

require 'zlib'
cpio = Zlib::GzipReader.open(filename)
File.write("archive.cpio", cpio.read)

But then we get the CPIO file:

$ file archive.cpio
archive.cpio: ASCII cpio archive (SVR4 with no CRC)

I've tried to unarchive it with this library with no success, because it supports only an old format. The formats differ by a magic number: 070707 for old, and 070701 for new.

The next step could be to rewrite the lib to support the new format.

@ronaldtse
Copy link
Contributor

ronaldtse commented Jan 7, 2021

@alexeymorozov The webcore-fonts-3.0-2.14.src.rpm file can be extracted using just "tar", so there's no need for CPIO or RPM extraction. See the extraction log above.

@alexeymorozov
Copy link
Contributor

alexeymorozov commented Jan 7, 2021

I've tried to do it with TarReader but it didn't work out. Could it be because tar supports extraction from cpio by default?

man tar

This implementation can extract from tar, pax, cpio, zip, jar, ar, xar, rpm, 7-zip, and ISO 9660 cdrom images and can create tar, pax, cpio, ar, zip, 7-zip, and shar archives.

@ronaldtse
Copy link
Contributor

Oh wow! Didn't know that the tar command supports them...

The next step could be to rewrite the lib to support the new format.

Let's create a new repo/gem that parses the new CPIO format (while also the old CPIO format): fontist/cpio#1

@alexeymorozov
Copy link
Contributor

Found working implementation of the CPIO unarchiver in unused files of arr-pm here.

Working draft (with some local files) of unarchiving of RPM is in fontist/fontist#207

@ronaldtse
Copy link
Contributor

ronaldtse commented Jan 10, 2021

@raffaem the fonts are now available since #74 released as fontist v1.8.4.

Please run:

$ gem install fontist
$ fontist update

Then you can install the fonts like:

fontist install symbol
fontist install 'wingdings 2'

Thanks again for the suggestion!

@raffaem
Copy link
Author

raffaem commented Jan 11, 2021

@raffaem the fonts are now available since #74 released as fontist v1.8.4.

Please run:

$ gem install fontist
$ fontist update

Then you can install the fonts like:

fontist install symbol
fontist install 'wingdings 2'

Thanks again for the suggestion!

Thank you very much. I am having a very hectic period but I was still able to follow this, it is incredible the amount of effort you put into this.

Thank you so much.

Best regards

@ronaldtse ronaldtse moved this to Done in Fontist Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants