diff --git a/modules/base/FontHandler.mjs b/modules/base/FontHandler.mjs index 50f1ef5db..ff431d3cd 100644 --- a/modules/base/FontHandler.mjs +++ b/modules/base/FontHandler.mjs @@ -43,8 +43,6 @@ async function loadFontFile(fname) { entry = gFontFiles[fname] = { promises: [] }; - console.log('loading', fname) - const locations = []; if (fname.indexOf('/') >= 0) locations.push(''); // just use file name as is @@ -52,8 +50,10 @@ async function loadFontFile(fname) { locations.push(source_dir + 'fonts/'); if (isNodeJs()) locations.push('../../fonts/'); - else if (source_dir.indexOf('jsrootsys/') >= 0) + else if (source_dir.indexOf('jsrootsys/') >= 0) { locations.unshift(source_dir.replace(/jsrootsys/g, 'rootsys_fonts')); + locations.unshift(source_dir.replace(/jsrootsys/g, 'rootsys/fonts')); + } } function completeReading(base64) { @@ -70,6 +70,7 @@ async function loadFontFile(fname) { throw new Error(`Fail to load ${fname} font`); } let path = locations.shift() + fname; + console.log('loading font', path); const pr = isNodeJs() ? import('fs').then(fs => { const prefix = 'file://' + (process?.platform === 'win32' ? '/' : ''); if (path.indexOf(prefix) === 0) diff --git a/modules/core.mjs b/modules/core.mjs index 5ddcfab75..bc825ce4d 100644 --- a/modules/core.mjs +++ b/modules/core.mjs @@ -268,7 +268,7 @@ settings = { YValuesFormat: undefined, /** @summary custom format for all Z values, when not specified {@link gStyle.fStatFormat} is used */ ZValuesFormat: undefined, - /** @summary Let detect and solve problem when browser returns wrong content-length parameter + /** @summary Let detect and solve problem when server returns wrong Content-Length header * @desc See [jsroot#189]{@link https://github.com/root-project/jsroot/issues/189} for more info * Can be enabled by adding 'wrong_http_response' parameter to URL when using JSROOT UI * @default false */ diff --git a/modules/gui/menu.mjs b/modules/gui/menu.mjs index 05657b45e..0f5ac5945 100644 --- a/modules/gui/menu.mjs +++ b/modules/gui/menu.mjs @@ -795,7 +795,7 @@ class JSRootMenu { this.addchk(settings.UseStamp, 'Use stamp arg', flag => { settings.UseStamp = flag; }); this.addSizeMenu('Max ranges', 1, 1000, [1, 10, 20, 50, 200, 1000], settings.MaxRanges, value => { settings.MaxRanges = value; }, 'Maximal number of ranges in single http request'); - this.addchk(settings.HandleWrongHttpResponse, 'Handle wrong http response', flag => { settings.HandleWrongHttpResponse = flag; }); + this.addchk(settings.HandleWrongHttpResponse, 'Handle wrong http response', flag => { settings.HandleWrongHttpResponse = flag; }, 'Let detect and solve problem when server returns wrong Content-Length header, see https://github.com/root-project/jsroot/issues/189'); this.addchk(settings.WithCredentials, 'With credentials', flag => { settings.WithCredentials = flag; }, 'Submit http request with user credentials'); this.endsub(); @@ -837,6 +837,8 @@ class JSRootMenu { this.endsub(); this.addPaletteMenu(settings.Palette, pal => { settings.Palette = pal; }); this.addchk(settings.AutoStat, 'Auto stat box', flag => { settings.AutoStat = flag; }); + this.addchk(settings.LoadSymbolTtf, 'Load symbol.ttf', flag => { settings.LoadSymbolTtf = flag; }, 'Use symbol.ttf font file to render greek symbols, also used in PDF'); + this.sub('Axis'); this.addchk(settings.StripAxisLabels, 'Strip labels', flag => { settings.StripAxisLabels = flag; }, 'Provide shorter labels like 10^0 -> 1'); this.addchk(settings.CutAxisLabels, 'Cut labels', flag => { settings.CutAxisLabels = flag; }, 'Remove labels which may exceed graphical range');