Bulletproof @Font-Face syntax
P粉566048790
2023-09-05 18:47:35
<p>I tried to install the font via FTP but got an error that the Bulletproof font syntax is incorrect. What did I do wrong? </p>
<p>Edit: I'm trying to fix the code with Jared's help and it's still working</p>
<p>
<pre class="brush:css;toolbar:false;">@font-face {
font-family: 'Brasilero2018Free';
src:
local("Brasilero2018Free"),
url('https://www.flordeibez.org/wp-content/themes/fonts/Brasilero2018Free.otf'),
url('https://www.flordeibez.org/wp-content/themes/fonts/Brasilero2018Free.eot') format('embedded-opentype'),
url('https://www.flordeibez.org/wp-content/themes/fonts/Brasilero2018Free.woff') format('woff'),
url('https://www.flordeibez.org/wp-content/themes/fonts/Brasilero2018Free.svg') format('svg'),
url('https://www.flordeibez.org/wp-content/themes/fonts/Brasilero2018Free.ttf') format('truetype');
}</pre>
</p>
<p>What I want: fonts installed without errors and displayed in Elementor Editor</p>
Your syntax is:
You just need to redefine the URL of the font in each line. So the browser will only use the last one, and the others will be discarded. The correct basic syntax is:
You can include additional font formats if you need to satisfy older browsers.
Note: Changed incorrect
format('ttf')
toformat('truetype')
, thanks @herrstrietzel