Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Loading custom font in Windows 8 Metro App

I found this link on how to embed custom fonts in XAML apps. Is there some way I can achieve the same while building using JS? The following method did not work.

@font-face {
    font-family: "MimicRoman";
    src: url("/fonts/MimicRoman.otf") format('opentype');
}
like image 861
sparkymat Avatar asked Nov 14 '22 08:11

sparkymat


1 Answers

Looks ok to me, that's how it should work. You are sure the path to the font file is correct and you did also actually use the font-face somewhere? For instance,

body {
    font-family: MimicRoman;
}

Also, you are sure there are no other font-family declarations taking precedence over the declaration you've made? (this can be seen quite easily with the DOM Explorer).

If nothing else works, you might want to test some other font file, just in case that file is corrupt or something (some working examples from here, for instance).

like image 103
harriha Avatar answered Nov 24 '22 01:11

harriha