How do I make a custom font from scratch?
@font-face {
font-family: JuneBug;
src: url('https://raw.githubusercontent.com/grannygamer777/DerpFont/main/my%20derp%20handwriting.ttf');
}
h1 {
font-family: JuneBug
}
<textarea
class="paint-editor_text-area_27Ci4"
spellcheck="false"
style="font-family: Arial, Helvetica, sans-serif; font-size: 40px; line-height: 1.2; display: initial; transform-origin: 0px 36px; transform: matrix(0.5, 0, 0, 0.5, 48.35, 59.25); width: 256.645px; height: 48px;"
></textarea>
The styles aren’t applying to the <textarea>
2
Answers
There are two things you must fix for your code to work:
h1
, not totextarea
. I suggest you add the `textarea selector like so:textarea
‘sstyle
attribute, you already have set the font to Arial. Remove thefont-family: Arial, Helvetica, sans-serif;
part of thestyle
attribute, else the custom font will not show.Hi just like any other css selector:
In your css file or style tag :