question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Unsupported OpenType signature <!DO

See original GitHub issue
Error: Unsupported OpenType signature <!DO
    at parseBuffer (opentype.js?6770:204)
    at eval (opentype.js?6770:378)
    at XMLHttpRequest.request.onload (opentype.js?6770:71)

Expected Behavior

Font loaded from file.

Current Behavior

Loading a font using https://github.com/shrhdk/text-to-svg and seeing this error from OpenType.js – very unfamiliar with font formats so not able to infer much from the error message except that perhaps the font file is formatted in a non-standard way? Only relevant search result in Google was #278 but the error message is a little different.

Font fails to load.

Possible Solution

I recognize that it’s possibly the font file that’s causing this issue but wanted to request input here in case this is an issue anyone recognizes.

Steps to Reproduce (for bugs)

Not sure I can provide this, the font in question is proprietary and licensed.

Your Environment

  • Version used: 0.7.3
  • Font used: Avenir
  • Browser Name and version: Chrome 69
  • Operating System and version (desktop or mobile): OSX High Sierra
  • Link to your project: not public

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
peilingjiangcommented, Oct 14, 2020

The thread has been silent for a long time but I just want to drop a word here in case anyone else get this problem in the future. I worked with p5 and React and got this problem. I was able to resolve it by import the file into the code and load it from there:

import Roboto from './font/Roboto-Black.ttf'

// ...

p.setup = () => {
  p.loadFont(Roboto, font => {
    console.log('Success!')
  })
}
2reactions
Jolg42commented, Jun 13, 2019

@CubeOfCheese What’s happening is actually the same ie:

“<!DO” is for “DOCTYPE” the first tag in an HTML file, this mean that you’re trying to open an HTML file. I guess it’s a 404 page or something like this 😉

Check the path to your .otf file and try again. I also suggest opening the Console at the Network tab to see what’s happening.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unsupported OpenType signature <!DO - Libraries
The error message "Unsupported OpenType signature <! DO" hints at a problem with either the file or Processing. I just don't get which...
Read more >
opentype.js font manipulation in P5.js
A web editor for p5.js, a JavaScript library with the goal of making coding accessible to artists, designers, educators, and beginners.
Read more >
p5.js | loadFont() Function - GeeksforGeeks
onError: This is a function which is called if the font does not load due to any error and it is an optional...
Read more >
Keywords - opentype.js - npm
Start using opentype.js in your project by running `npm i opentype.js`. There are 294 other projects in the npm registry using opentype.js.
Read more >
opentype.js - Source code - Greasy Fork
If not, it will throw an error. exports.argument = function(predicate, ... else {; throw new Error('Unsupported OpenType signature ' + signature);; } ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found