Skip to content

Commit 0ee8fdf

Browse files
committed
Use woff2 rather than woff
1 parent b5c184b commit 0ee8fdf

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

components/mjs/output/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const OutputUtil = {
6464
});
6565
if (jax === 'chtml') {
6666
combineDefaults(MathJax.config, jax, {
67-
fontURL: Package.resolvePath(`${font}/${jax}/woff`, false),
67+
fontURL: Package.resolvePath(`${font}/${jax}/woff2`, false),
6868
});
6969
}
7070

ts/output/chtml/FontData.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ export class ChtmlFontData extends FontData<
9595
*/
9696
public static OPTIONS = {
9797
...FontData.OPTIONS,
98-
dynamicPrefix: './output/chtml/fonts',
99-
fontURL: 'js/output/chtml/fonts/woff',
98+
dynamicPrefix: './chtml/dynamic',
99+
fontURL: './chtml/woff2',
100100
};
101101

102102
/**
@@ -186,7 +186,7 @@ export class ChtmlFontData extends FontData<
186186
const name = font.slice(4);
187187
fontStyles[`@font-face /* ${name} */`] = {
188188
'font-family': font,
189-
src: `url("%%URL%%/${font.toLowerCase()}.woff") format("woff")`,
189+
src: `url("%%URL%%/${font.toLowerCase()}.woff2") format("woff2")`,
190190
};
191191
styles[`.${name}`] = {
192192
'font-family': `${this.defaultCssFamilyPrefix}, ${font}`,

ts/output/common/FontData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ export class FontData<
381381
/* prettier-ignore */
382382
public static OPTIONS: OptionList = {
383383
unknownFamily: 'serif', // Should use 'monospace' with LiteAdaptor
384-
dynamicPrefix: '.' // Location of dynamically loaded files
384+
dynamicPrefix: '.', // Location of dynamically loaded files
385385
};
386386

387387
/**

ts/output/svg/FontData.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import {
3131
FontExtensionData,
3232
mergeOptions,
3333
} from '../common/FontData.js';
34+
3435
export * from '../common/FontData.js';
3536

3637
export type CharStringMap = { [name: number]: string };
@@ -86,7 +87,7 @@ export class SvgFontData extends FontData<
8687
*/
8788
public static OPTIONS = {
8889
...FontData.OPTIONS,
89-
dynamicPrefix: './output/svg/fonts',
90+
dynamicPrefix: './svg/dynamic',
9091
};
9192

9293
/**

0 commit comments

Comments
 (0)