Custom font embedding in HTML5/Javascript app? RRS feed

  • Question

  • Now I'm developing game on metro with HTML5/Javascript.

    (I'm working on Release Preview).

    I'd like to use custom font to give more fun.
    The font definitely is packaged in application  package.

    I tried , for example, "CustomFont" which is in my application package.

    @font-face {
       font-family: "CustomFont";
       src: url("/fonts/CustomFont.ttf") format('truetype');

    And styled one of DIV element with that font-family/

    #myContent {
       font-family: "CustomFont";

    But the app only displayed another font which has same typeface.

    I tried




    but nothing worked.

    How can I embed custom font?

    • Edited by JayLee76 Tuesday, June 12, 2012 6:43 PM
    Tuesday, June 12, 2012 5:42 PM


All replies