Skip to content
This repository has been archived by the owner on May 25, 2020. It is now read-only.

Crashed with fontTools.ttLib.TTLibError: specify a font number between 0 and 27 (inclusive) #1

Open
Vdragon opened this issue Jun 21, 2017 · 0 comments
Assignees

Comments

@Vdragon
Copy link

Vdragon commented Jun 21, 2017

Trying to use the script against a SVG(intentionally), it crashes with this error:

python3.6 subfont.py -f ~/.local/share/fonts/Adobe\ -\ Source\ Han\ Serif\ 思源宋體\ -\ 開放來源碼的泛\ CJK\ 字體/SourceHanSerif.ttc --output-directory . -- ~/工作空間/社群/台灣在地化社群/臺灣在地化社群的標誌/來源碼/l10n-tw-logo.svg                                                                                  
found 0 characters.                                                                                                                                          
Traceback (most recent call last):                                                                                                                           
  File "/usr/local/bin/pyftsubset", line 11, in <module>                                                                                                     
    sys.exit(main())                                                                                                                                         
  File "/usr/local/lib/python3.6/dist-packages/fontTools/misc/loggingTools.py", line 372, in wrapper                                                         
    return func(*args, **kwds)                                                                                                                               
  File "/usr/local/lib/python3.6/dist-packages/fontTools/subset/__init__.py", line 2954, in main                                                             
    font = load_font(fontfile, options, dontLoadGlyphNames=dontLoadGlyphNames)                                                                               
  File "/usr/local/lib/python3.6/dist-packages/fontTools/misc/loggingTools.py", line 372, in wrapper                                                         
    return func(*args, **kwds)                                                                                                                               
  File "/usr/local/lib/python3.6/dist-packages/fontTools/subset/__init__.py", line 2801, in load_font                                                        
    lazy=lazy)                                                                                                                                               
  File "/usr/local/lib/python3.6/dist-packages/fontTools/ttLib/__init__.py", line 180, in __init__
    self.reader = sfnt.SFNTReader(file, checkChecksums, fontNumber=fontNumber)
  File "/usr/local/lib/python3.6/dist-packages/fontTools/ttLib/sfnt.py", line 62, in __init__
    raise ttLib.TTLibError("specify a font number between 0 and %d (inclusive)" % (self.numFonts - 1))
fontTools.ttLib.TTLibError: specify a font number between 0 and 27 (inclusive)
generation failed ~/.local/share/fonts/Adobe - Source Han Serif 思源宋體 - 開放來源碼的泛 CJK 字體/SourceHanSerif.ttc
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants