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

[Bug] got an error when generating font #8

Closed
zhaihao opened this issue May 13, 2023 · 4 comments
Closed

[Bug] got an error when generating font #8

zhaihao opened this issue May 13, 2023 · 4 comments

Comments

@zhaihao
Copy link

zhaihao commented May 13, 2023

the settings
2

and my font file:
MapleMonoSCNFNerdFont-Regular.ttf.zip

then I got an error:

An error occur: Traceback (most recent call last):
  File "<exec>", line 154, in processFont
  File "<exec>", line 157, in main
  File "/lib/python3.11/site-packages/fontTools/ttLib/ttFont.py", line 212, in save
    writer_reordersTables = self._save(tmp)
                            ^^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/fontTools/ttLib/ttFont.py", line 259, in _save
    self._writeTable(tag, writer, done, tableCache)
  File "/lib/python3.11/site-packages/fontTools/ttLib/ttFont.py", line 711, in _writeTable
    tabledata = self.getTableData(tag)
                ^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/fontTools/ttLib/ttFont.py", line 733, in getTableData
    return self.tables[tag].compile(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/fontTools/ttLib/tables/O_S_2f_2.py", line 161, in compile
    self.panose = sstruct.pack(panoseFormat, self.panose)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/fontTools/misc/sstruct.py", line 66, in pack
    obj = obj.__dict__
          ^^^^^^^^^^^^
AttributeError: 'str' object has no attribute '__dict__'
@MuTsunTsai
Copy link
Owner

MuTsunTsai commented May 14, 2023

It appears that MapleMono font in particular is not exactly created according to specs and could lead to various issues (such as #7) with font processing softwares. I could investigate into this when I have time, but likely this might not be an issue of FontFreeze.

@zhaihao
Copy link
Author

zhaihao commented May 15, 2023

@MuTsunTsai Thank you. I have solved this issue. You are right. The font file is patched by nerd-fonts.

so, freeze the font before applying the patch by nerd fonts can work very well

@zhaihao zhaihao closed this as completed May 15, 2023
@MuTsunTsai
Copy link
Owner

@zhaihao Ah, that's good to know! I've added that remark in README.

@Finii
Copy link

Finii commented Jul 15, 2023

Well, it seems an ancient version of the Nerd Fonts font-patcher is used by maple-font.
More importantly, and probably the reason for the bug, is to use a recent (i.e. Release 2023.01.01) fontforge together with the font-patcher. There have been various bugfixes in fontforge that resulted in broken tables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants