I’m making a layout that uses Unica One https://fonts.google.com/specimen/Unica+One , it has a regular setting, but phpstorm refuses to accept this entry:

font-family: "UnicaOne", regular; 

Accepts a font-family: "UnicaOne", sans-serif; entry font-family: "UnicaOne", sans-serif; but with such a record, the font looks like this:

enter image description here

And if you look at it is not the font. What am I doing wrong?

    2 answers 2

    Regular is the usual style, in CSS there is no such value for the font property. Not so you call the use of this font, it is necessary to write through a space - Unica One .

     p { font-family: "Unica One", sans-serif; font-size: 2rem; } 
     <link href="https://fonts.googleapis.com/css?family=Unica+One" rel="stylesheet"> <p>This is hand-typed text.</p> 

      I will add to the answer of Sasha Omelchenko a little bit of information that will make your life easier when working with custom fonts:

      A). Look closely optional. There are tools for debugging.
      For example in chrome dev tools (F12 in chrome):
      one). Inspect the item (Ctrl + Shift + C or the corresponding button).
      enter image description here
      2). We watch it computed styles
      3). Scroll to the bottom and see what font the browser has rendered in fact and where it was taken. And do not measure "by eye".

      enter image description here

      B). First you need to connect a googlofont for a quick copy-paste, and then experiment.
      To do this in google phone right above the plus sign "select this font".
      enter image description here

      A dropout will appear on the bottom right,
      enter image description here you need to click on it, there will be a connection address and default style, you can make ctrl + c / ctrl + v and not make mistakes in the font name or font connection address.

      • one
        On the example of this answer you can see my progress in drawing arrows - Duck Learns to Hide