How to render custom fonts in the <select> tag?

I have a set of custom fonts (not system fonts) that I want to use on one of my pages (MVC 3). I want to display these fonts in a tag <select>, but is it possible to render the text inside each element as a font style?

In other words, I want to display, for example, this font enter image description here

in one of the tag elements

+3
source share
1 answer

yes You declare it in CSS as follows:

 @font-face { font-family: urfont; src: url('urfont.otf'); } 
 @font-face { font-family: urfont; font-weight: bold; src: url('urfont.otf');}

Then you can just refer to it like other standard fonts:

<select style="font-family: urfont, sans-serif;"
+3
source

All Articles