I am a newbie in web developement. I have to use dodger font. I have all ttf ,otf ,svg files. How to get the font family of a font , is there anyway i can find the font famiy. I have googled a lot, but no luck
Asked
Active
Viewed 1,102 times
0
-
1You need to add the Dodger font to your website, check out this stack overflow post https://stackoverflow.com/questions/107936/how-to-add-some-non-standard-font-to-a-website – cameck Nov 19 '17 at 16:06
-
Possible duplicate of [How to add some non-standard font to a website?](https://stackoverflow.com/questions/107936/how-to-add-some-non-standard-font-to-a-website) – Tobias Schäfer Nov 19 '17 at 16:07
-
You misunderstand CSS: CSS is under *your* control, and you get to *dictate* to the browser what CSS should load when you give it *whatever* font family name. `@font-face { font-family: whateverNameYouWant; src: url(...); }` tells CSS that whenever you use `font-family: whatevernameYouWant` in your site CSS, the render engine **must** load the font that you said went with that font family name. – Mike 'Pomax' Kamermans Nov 20 '17 at 02:19
1 Answers
0
This is how to import font files:
@font-face {
font-family: "MyFont";
src: url("/pathToFonts/myfont.ttf");
}
Usage:
p{
font-family: "MyFont";
}
Hope this helps.

Tobias Schäfer
- 1,330
- 2
- 17
- 35
-
-
What ever you like. You can call it "FontyMacFontFace" if you like. But better the filename of your font. – Tobias Schäfer Nov 19 '17 at 16:11
-
In your case it should look like: @font-face { font-family: "Dodger"; src: url("/pathToFonts/dodger.ttf"); #However the file is named. } – Tobias Schäfer Nov 19 '17 at 16:13
-
1However, do not use the .ttf or .otf font directly. Wrap them as WOFF or WOFF2, because using a *universal OpenType system font* for the web in 2017 (coming up to 2018) makes about as much sense as using TIFF instead of JPG or PNG. Take advantage of what WOFF does for fonts. – Mike 'Pomax' Kamermans Nov 20 '17 at 02:18