Last active
April 20, 2018 13:03
-
-
Save icfantv/4718228 to your computer and use it in GitHub Desktop.
font resource
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@url font1Url font1; | |
@font-face | |
{ | |
font-family: MyFont1; | |
src: font1Url format('opentype'); | |
font-weight: normal; | |
font-style: normal; | |
} | |
@url font2Url font2; | |
@font-face | |
{ | |
font-family: MyFont2; | |
src: font2Url format('opentype'); | |
font-weight: normal; | |
font-style: normal; | |
} | |
@url font3Url font3; | |
@font-face | |
{ | |
font-family: MyFont3; | |
src: font3Url format('opentype'); | |
font-weight: normal; | |
font-style: normal; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface FontResource extends ClientBundle | |
{ | |
FontResource INSTANCE = GWT.create(FontResource.class); | |
@Source("font1.otf") | |
DataResource font1(); | |
@Source("font2.otf") | |
DataResource font2(); | |
@Source("font3.otf") | |
DataResource font3(); | |
@Source("font.css") | |
CssResource css(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* FontResource.java and font.css will generate something similar to the following CSS */ | |
@font-face | |
{ | |
font-family:MyFont1; | |
src:url(http://10.10.10.10:8081/gwt_app/5F80AF6F2BD333983585159DE2E158E0.cache.otf) format(opentype); | |
font-weight:normal; | |
font-style:normal; | |
} | |
@font-face | |
{ | |
font-family:MyFont2; | |
src:url(http://10.10.10.10:8081/gwt_app/A32759B935A5B8A190AF4C10889BFFD4.cache.otf) format(opentype); | |
font-weight:normal; | |
font-style:normal; | |
} | |
@font-face | |
{ | |
font-family:MyFont3; | |
src:url(http://10.10.10.10:8081/gwt_app/EA810D510EC77E10ACB62B3EDC81A216.cache.otf) format(opentype); | |
font-weight:normal; | |
font-style:normal; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment