Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

davy_yg's avatar
Level 27

Using custom fonts

When trying to update fonts:

@font-face {
    font-family: 'Ubuntu-R';
    src: url('fonts/Ubuntu/Ubuntu-R.ttf') format('truetype');
}

@font-face {
    font-family: 'Ubuntu-B';
    src: url('fonts/Ubuntu/Ubuntu-B.ttf') format('truetype');
}

This line: src: url('fonts/Ubuntu/Ubuntu-R.ttf') format('truetype');

      @font-face declaration doesn't follow the fontspring bulletproof syntax

I am using Firefox but would like it to works in all browser.

ref: https://stackoverflow.com/questions/33475526/cant-understand-the-bulletproof-font-face-css-rule

Any clue why? I still do not understand which one to fix.

0 likes
3 replies
jlrdw's avatar

Well the answer in that article is a way of getting the fonts to work in other browsers.

davy_yg's avatar
Level 27

I finally solved the error. There is one more thing:

font-family: 'Ubuntu-R', 'mauerMtrpl', 'Libre Franklin', 'Helvetica Neue', Helvetica, Arial, sans-serif;

One css theme is using a long list of font family. Which font family will be executed?

Please or to participate in this conversation.