OTS parsing error: invalid version tag
thisVioletHydra opened this issue · 5 comments
work
windows 10 x64
node 10
yarn 1.6.0
ERROR: Chrome DevTools
Failed to decode downloaded font: https://localhost:3000/media/fonts/Glyphs/woff2/i-Glyphs.woff2
OTS parsing error: invalid version tag
gulp4
initConfig:
fontNameIni = 'Glyphs',
iconfontCssConfig = {
fontName: fontNameIni,
targetPath: dir + `${inDev}/tmp/glyphs.styl`,
cssClass: 'DUMMYTEXT',
},
iconfontConfig = {
fontName: fontNameIni,
prependUnicode: true,
formats: ['woff2'],
normalize: true,
fontHeight: 1001,
timestamp: Math.round(Date.now() / 1000),
},
task
_run = package plugin loader...
// * __glyphs svg
task('img:tosvg', () => {
return combiner(
src(`${inDevApps}/img/__glyphs/**/*.svg`, { allowEmpty: true }),
_run.iconfontCss(iconfontCssConfig),
_run.replace(iconfontReplace.in, iconfontReplace.out),
_run.replace('@font-face', '.DUMMYTEXT__'),
_run.iconfont(iconfontConfig),
dest(`${inPub}/media/fonts/Glyphs/woff2/`)
);
});
stylus
font-face
__fontGlyphs = 'Glyphs';
__fontPreffix = 'i-';
/* ==== Glyphs ==== */
glyphFonts(name) {
@font-face {
type = 'woff2' 'woff' 'ttf'
dirName = 'fonts' + '/' + name + '/'
x = 0;
font-family __fontPreffix + name;
src: local(__fontPreffix + name),
url( dirName + type[x] + '/' + name + '.' type[x] ) format(type[x]);
font-style: normal;
font-weight: normal;
font-display: block;
}
}
/* ==== ---- ==== */
Please try to convert your TTF file into a WOFF2 one by using this tool https://github.com/google/woff2
Then, load it again and tell us if it fixes your error.
@nfroidure I try to convert SVG to woff2 :0
a couple of weeks ago everything worked, now there. what's the matter, I do not know.
I just updated the libraries via yarn
This plugins first converts SVG to TTF and then TTF to WOFF2. Just add TTF to the outputed font in this plugin options and try doing what I suggested above to see if it fixes the problem.
The goal is to see if the problem sits within the TTF to WOFF2 converter or if it is located somewhere upstream.
In the near future, I check it and answer you.
I refused the fonts, switched to svg inline, the subject can be closed