Error: Unsupported OpenType signature <!DO
See original GitHub issueError: 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:
- Created 5 years ago
- Comments:12 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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:
@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.