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 has no name table throw TypeError: Cannot read property 'compression' of undefined #458

Open
i2534 opened this issue Dec 8, 2020 · 1 comment · May be fixed by #648
Open

Font has no name table throw TypeError: Cannot read property 'compression' of undefined #458

i2534 opened this issue Dec 8, 2020 · 1 comment · May be fixed by #648
Assignees
Labels

Comments

@i2534
Copy link

i2534 commented Dec 8, 2020

Expected Behavior

skip parse name table

Current Behavior

When open an embed font, who's tables like (ttfdump):
Offset Table


sfnt version: 1.0
numTables = 9
searchRange = 128
entrySelector = 3
rangeShift = 16

  1. 'cvt ' - chksm = 0x74E2F99D, off = 0x0000009C, len = 2092
  2. 'fpgm' - chksm = 0x379E7810, off = 0x000008C8, len = 1599
  3. 'glyf' - chksm = 0xABC33A52, off = 0x00000F08, len = 4246
  4. 'head' - chksm = 0xE3ACEF64, off = 0x00001FA0, len = 54
  5. 'hhea' - chksm = 0x13041853, off = 0x00001FD8, len = 36
  6. 'hmtx' - chksm = 0xBA6A7548, off = 0x00001FFC, len = 16392
  7. 'loca' - chksm = 0x01068764, off = 0x00006004, len = 16396
  8. 'maxp' - chksm = 0x194B065D, off = 0x0000A010, len = 32
  9. 'prep' - chksm = 0x025F6028, off = 0x0000A030, len = 4968

so nameTableEntry is undefined,
opentype.js line 311: const nameTable = uncompressTable(data, nameTableEntry);
cause TypeError: Cannot read property 'compression' of undefined

Possible Solution

check nameTableEntry is undefined

Steps to Reproduce (for bugs)

  1. load font.zip as ArrayBuffer
  2. invoke Font.parse(buffer)

Context

Your Environment

  • Version used: 1.3.3
  • Font used:
  • Browser Name and version: Google Chrome 87.0.4280.88 x64
  • Operating System and version (desktop or mobile): Windows 10 1909
  • Link to your project:
@yne yne added the bug label Apr 21, 2022
@Connum
Copy link
Contributor

Connum commented Nov 25, 2023

Might be fixed by #648, I'll have to check

@Connum Connum self-assigned this Nov 25, 2023
@Connum Connum linked a pull request Nov 26, 2023 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants