Webfonts with GS

60 views
Skip to first unread message

Kay Pac

unread,
Aug 12, 2016, 7:34:59 PM8/12/16
to GWT Users
I tried to follow the instructions at this link : http://stackoverflow.com/questions/28507667/using-custom-fonts-with-google-web-toolkit

They are in the first answer to the question. Basically I am trying to use a webfont with GSS. I got it to work in super dev mode but it doesn't work in the regular compiled mode. I looked at the source code and it appears the GSS goes in a style element. What I end up with is:

@font-face{font-family:'SEDEXPERSONALUSE';src:sedexPersonalUseOtf format('opentype')}.GMU0YGB-b-a{font-family:'SEDEXPERSONALUSE';color:white;font-size:150%}

Clearly "sedexPersonalUseOtf" is not being replaced with the correct url for the file. I put the file in the same directory as the gss file. In my GSS is:

@def SEDEXPERSONALUSE_OTF sedexPersonalUseOtf;
@font-face
{
font-family: 'SEDEXPERSONALUSE';
src: SEDEXPERSONALUSE_OTF format('opentype');
}


and I have a corresponding method in my interface for the GSS.

I am new to GSS and Web Fonts so I am really cobbling this together. Any help would be appreciated.

Kay

Kay Pac

unread,
Aug 12, 2016, 7:43:00 PM8/12/16
to GWT Users
Well, at some point this worked but now that I've recompiled it works neither in super dev mode nor regular compiled mode.

Kay Pac

unread,
Aug 12, 2016, 7:44:59 PM8/12/16
to GWT Users
Okay, I see what I did wrong, I used the old-style CSS @def instead of the GSS @def, which must of worked because I hadn't fully enabled GSS in my application. Or something.
I got it to work I just needed resourceUrl() in my @def.


On Friday, August 12, 2016 at 4:34:59 PM UTC-7, Kay Pac wrote:
Reply all
Reply to author
Forward
0 new messages