Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recursive inline of css url - woff format binary font #73

Open
milahu opened this issue Mar 12, 2021 · 1 comment
Open

recursive inline of css url - woff format binary font #73

milahu opened this issue Mar 12, 2021 · 1 comment

Comments

@milahu
Copy link

milahu commented Mar 12, 2021

input - index.html

<link rel="stylesheet" href="/css/noto-sans/latin.css">

input - css/noto-sans/latin.css

/* noto-sans-latin-400-normal*/
@font-face {
  font-family: 'Noto Sans';
  src:
    local('Noto Sans'),
    local('NotoSans'),
    url('./files/noto-sans-latin-400-normal.woff2') format('woff2'),
    url('./files/noto-sans-latin-400-normal.woff') format('woff');
}

actual result

<style>
/* noto-sans-latin-400-normal*/
@font-face {
  font-family: 'Noto Sans';
  src:
    local('Noto Sans'),
    local('NotoSans'),
    url("css/noto-sans/files/noto-sans-latin-400-normal.woff2") format('woff2'),
    url("css/noto-sans/files/noto-sans-latin-400-normal.woff") format('woff');
}
</style>

expected result (as produced by the good-old inliner)

<style> @font-face{ font-family:'Noto Sans';font-style:normal;font-display:swap;font-weight:400;src:local('Noto Sans'), local('NotoSans'), url('data:application/font-woff2;base64,d09GMgABAAAAAD64ABEAAAAAd5AAAD5YAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGmobjkQcMgZgAIMSCIF+CY80ERAKgbQIgZoaC4NWAAE2AiQDhygEIAWDGAcgDIQaG6FnNWybNp27VUUrNARqJMJGClJwFMHGAQSFLUv+/48JMsbth9tXAUelosS0xmgLlpETplnhYA8FURBlp46.....

the file css/noto-sans/files/noto-sans-latin-400-normal.woff2 does exist ; )
its from the npm package @fontsource/noto-sans

inliner found the file too, maybe that file type is not yet supported here?

@jrit
Copy link
Owner

jrit commented Mar 15, 2021

yeah there is no "recursive" mode available. I would be happy to take a PR to enable that in some way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants