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

convert otf file to clm file fail #97

Open
PikachuHy opened this issue Jan 28, 2022 · 1 comment
Open

convert otf file to clm file fail #97

PikachuHy opened this issue Jan 28, 2022 · 1 comment
Assignees
Labels

Comments

@PikachuHy
Copy link
Contributor

error info

fontforge -lang=py -script otf2clm.py --sinle ../res/xits/XITSMath-Regular.otf true ../res/xits/XITSMath-Regular.clm2
Copyright (c) 2000-2020. See AUTHORS for Contributors.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
 Version: 20190801
 Based on sources from 03:10 UTC  6-Mar-2020-ML-D-GDK3.
parsing font ../res/xits/XITSMath-Regular.otf, please wait...
Traceback (most recent call last):
  File "otf2clm.py", line 719, in <module>
    main()
  File "otf2clm.py", line 710, in main
    parse_otf(
  File "otf2clm.py", line 625, in parse_otf
    glyphs.append(read_glyph(
  File "otf2clm.py", line 312, in read_glyph
    None if not parse_path else read_glyph_path(glyph),
  File "otf2clm.py", line 252, in read_glyph_path
    glyph.export(tf.name, usetransform=True)
TypeError: export() takes no keyword arguments

https://github.com/NanoMichael/cLaTeXMath/blob/a0493830bffccc30c4567b474319684ec9747166/prebuilt/otf2clm.py#L252

my env

  • WSL. Ubuntu 20.04.2 LTS (GNU/Linux 5.4.72-microsoft-standard-WSL2 x86_64)
  • fontforge
fontforge --version
Copyright (c) 2000-2020. See AUTHORS for Contributors.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
 Version: 20190801
 Based on sources from 03:10 UTC  6-Mar-2020-ML-D-GDK3.
fontforge 20190801
build date: 03:10 UTC  6-Mar-2020
  • python
python3
Python 3.8.5 (default, Jan 27 2021, 15:41:15)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

tmp solution
change glyph.export(tf.name, usetransform=True) to glyph.export(tf.name)

note: I don't have a deep understanding of the cause of this problem, and I'm not aware of the side effects of the tmp solution.

@NanoMichael
Copy link
Owner

That's because the version of fontforge is too low, thus the function glyph.export has no second argument. And my fontforge has the version 20200314. We need a version check before using it, will fix it later.

@NanoMichael NanoMichael self-assigned this Feb 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants