@Font-face --- adding a custom font

350 views
Skip to first unread message

bruce....@gmail.com

unread,
Sep 1, 2015, 10:54:19 AM9/1/15
to Google Web Designer beta

I'm trying to add a custom font.

I found that I had to add the custom font files; MyFont.ttf.svg, MyFont.ttf.eot, MyFont.ttf.woff to the assets directory.

Then add the following to the source file


@font-face{font-family:MyFont;src:
url("assets/MyFont.ttf.woff") format(woff),
url("assets/MyFont.ttf.svg") format(svg),
url("assets/MyFont.ttf.eot"),
url("assets/MyFont.ttf.eot?#iefix") format(embedded-opentype);

src:local(MyFont), url("assets/MyFont.ttf.woff");

font-weight:normal;font-style:normal}


It will not work in firefox without the "src:local" line.

The problem is that if you input this into GWD source, it removes the first half and only keels the firefox fix.


Is there some other means to add custom fonts that is more straight forward and does not require messing around with code?

Reply all
Reply to author
Forward
0 new messages