From 8fa0110b6d1932c2cf3a30cea35f0a698f2aaecc Mon Sep 17 00:00:00 2001 From: saltyaom Date: Fri, 3 Jun 2022 21:36:59 +0700 Subject: [PATCH] fix: opentype font format --- pnpm-lock.yaml | 38 +++++++++++++++++++------------------- src/custom.ts | 1 + 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6983ce7..f51e515 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: 5.3 +lockfileVersion: 5.4 importers: @@ -15,8 +15,8 @@ importers: dependencies: fast-glob: 3.2.11 devDependencies: - '@antfu/eslint-config-ts': 0.18.8_eslint@8.11.0+typescript@4.6.2 - '@typescript-eslint/eslint-plugin': 5.15.0_eslint@8.11.0+typescript@4.6.2 + '@antfu/eslint-config-ts': 0.18.8_ynv3edxl3ah44xwgrna2g2yine + '@typescript-eslint/eslint-plugin': 5.15.0_ynv3edxl3ah44xwgrna2g2yine eslint: 8.11.0 eslint-plugin-eslint-comments: 3.2.0_eslint@8.11.0 tsup: 5.12.1_typescript@4.6.2 @@ -39,7 +39,7 @@ packages: eslint: '>=7.4.0' dependencies: eslint: 8.11.0 - eslint-config-standard: 17.0.0-1_e3fbc39d1dad97c63e2c5f7699d49cd4 + eslint-config-standard: 17.0.0-1_4p54hhi5vwl4mprml53jtve42q eslint-plugin-eslint-comments: 3.2.0_eslint@8.11.0 eslint-plugin-html: 6.2.0 eslint-plugin-import: 2.25.4_eslint@8.11.0 @@ -55,15 +55,15 @@ packages: - supports-color dev: true - /@antfu/eslint-config-ts/0.18.8_eslint@8.11.0+typescript@4.6.2: + /@antfu/eslint-config-ts/0.18.8_ynv3edxl3ah44xwgrna2g2yine: resolution: {integrity: sha512-BeQcYwluWr2Elc/z6kfg0MowHl0smsLq2+s/OKJ2dJMSez+Pmkp/T+dMlo01PExODWvlROlmgtm34Z7JNUd+nA==} peerDependencies: eslint: '>=7.4.0' typescript: '>=3.9' dependencies: '@antfu/eslint-config-basic': 0.18.8_eslint@8.11.0 - '@typescript-eslint/eslint-plugin': 5.15.0_f2c49ce7d0e93ebcfdb4b7d25b131b28 - '@typescript-eslint/parser': 5.15.0_eslint@8.11.0+typescript@4.6.2 + '@typescript-eslint/eslint-plugin': 5.15.0_6lcjzz6q5e7lz7nuw7jfwey3fa + '@typescript-eslint/parser': 5.15.0_ynv3edxl3ah44xwgrna2g2yine eslint: 8.11.0 typescript: 4.6.2 transitivePeerDependencies: @@ -163,7 +163,7 @@ packages: resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} dev: true - /@typescript-eslint/eslint-plugin/5.15.0_eslint@8.11.0+typescript@4.6.2: + /@typescript-eslint/eslint-plugin/5.15.0_6lcjzz6q5e7lz7nuw7jfwey3fa: resolution: {integrity: sha512-u6Db5JfF0Esn3tiAKELvoU5TpXVSkOpZ78cEGn/wXtT2RVqs2vkt4ge6N8cRCyw7YVKhmmLDbwI2pg92mlv7cA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -174,9 +174,10 @@ packages: typescript: optional: true dependencies: + '@typescript-eslint/parser': 5.15.0_ynv3edxl3ah44xwgrna2g2yine '@typescript-eslint/scope-manager': 5.15.0 - '@typescript-eslint/type-utils': 5.15.0_eslint@8.11.0+typescript@4.6.2 - '@typescript-eslint/utils': 5.15.0_eslint@8.11.0+typescript@4.6.2 + '@typescript-eslint/type-utils': 5.15.0_ynv3edxl3ah44xwgrna2g2yine + '@typescript-eslint/utils': 5.15.0_ynv3edxl3ah44xwgrna2g2yine debug: 4.3.3 eslint: 8.11.0 functional-red-black-tree: 1.0.1 @@ -189,7 +190,7 @@ packages: - supports-color dev: true - /@typescript-eslint/eslint-plugin/5.15.0_f2c49ce7d0e93ebcfdb4b7d25b131b28: + /@typescript-eslint/eslint-plugin/5.15.0_ynv3edxl3ah44xwgrna2g2yine: resolution: {integrity: sha512-u6Db5JfF0Esn3tiAKELvoU5TpXVSkOpZ78cEGn/wXtT2RVqs2vkt4ge6N8cRCyw7YVKhmmLDbwI2pg92mlv7cA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -200,10 +201,9 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.15.0_eslint@8.11.0+typescript@4.6.2 '@typescript-eslint/scope-manager': 5.15.0 - '@typescript-eslint/type-utils': 5.15.0_eslint@8.11.0+typescript@4.6.2 - '@typescript-eslint/utils': 5.15.0_eslint@8.11.0+typescript@4.6.2 + '@typescript-eslint/type-utils': 5.15.0_ynv3edxl3ah44xwgrna2g2yine + '@typescript-eslint/utils': 5.15.0_ynv3edxl3ah44xwgrna2g2yine debug: 4.3.3 eslint: 8.11.0 functional-red-black-tree: 1.0.1 @@ -216,7 +216,7 @@ packages: - supports-color dev: true - /@typescript-eslint/parser/5.15.0_eslint@8.11.0+typescript@4.6.2: + /@typescript-eslint/parser/5.15.0_ynv3edxl3ah44xwgrna2g2yine: resolution: {integrity: sha512-NGAYP/+RDM2sVfmKiKOCgJYPstAO40vPAgACoWPO/+yoYKSgAXIFaBKsV8P0Cc7fwKgvj27SjRNX4L7f4/jCKQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -244,7 +244,7 @@ packages: '@typescript-eslint/visitor-keys': 5.15.0 dev: true - /@typescript-eslint/type-utils/5.15.0_eslint@8.11.0+typescript@4.6.2: + /@typescript-eslint/type-utils/5.15.0_ynv3edxl3ah44xwgrna2g2yine: resolution: {integrity: sha512-KGeDoEQ7gHieLydujGEFLyLofipe9PIzfvA/41urz4hv+xVxPEbmMQonKSynZ0Ks2xDhJQ4VYjB3DnRiywvKDA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -254,7 +254,7 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/utils': 5.15.0_eslint@8.11.0+typescript@4.6.2 + '@typescript-eslint/utils': 5.15.0_ynv3edxl3ah44xwgrna2g2yine debug: 4.3.3 eslint: 8.11.0 tsutils: 3.21.0_typescript@4.6.2 @@ -289,7 +289,7 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.15.0_eslint@8.11.0+typescript@4.6.2: + /@typescript-eslint/utils/5.15.0_ynv3edxl3ah44xwgrna2g2yine: resolution: {integrity: sha512-081rWu2IPKOgTOhHUk/QfxuFog8m4wxW43sXNOMSCdh578tGJ1PAaWPsj42LOa7pguh173tNlMigsbrHvh/mtA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -913,7 +913,7 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-standard/17.0.0-1_e3fbc39d1dad97c63e2c5f7699d49cd4: + /eslint-config-standard/17.0.0-1_4p54hhi5vwl4mprml53jtve42q: resolution: {integrity: sha512-aqRG58dqoBNfOLN+PsitasxmW+W9Os4oQrx081B16T4E4WogsSbpUL6hnKSnyv35sSRYA2XjBtKMOrUboL6jgw==} peerDependencies: eslint: ^8.0.1 diff --git a/src/custom.ts b/src/custom.ts index 19884c6..47e2712 100644 --- a/src/custom.ts +++ b/src/custom.ts @@ -112,6 +112,7 @@ const createFontFaceCSS = ({ name, src, local, weight, style, display }: CustomF .map((url) => { let format = url.split('.').pop() if (format === 'ttf') format = 'truetype' + if (format === 'otf') format = 'opentype' return `url('${url}') format('${format}')` }) .join(',\n\t\t')