-
Bug
-
Resolution: Fixed
-
P3
-
8
@font-face like below will not font the font file relative to the CSS file location like other CSS urls do.
@font-face {
font-family: AFont;
src: url('fonts/AFontFile.ttf');
}
In StyleManager line 918 there is
// load any fonts from @font-face
if (stylesheet != null) {
faceLoop: for(FontFace fontFace: stylesheet.getFontFaces()) {
for(FontFace.FontFaceSrc src: fontFace.getSources()) {
if (src.getType() == FontFace.FontFaceSrcType.URL) {
Font loadedFont = Font.loadFont(src.getSrc(),10);
getLogger().info("Loaded @font-face font [" + (loadedFont == null ? "null" : loadedFont.getName()) + "]");
continue faceLoop;
}
}
}
This needs to be fixed to resolve urls relative to the stylesheet.
}
@font-face {
font-family: AFont;
src: url('fonts/AFontFile.ttf');
}
In StyleManager line 918 there is
// load any fonts from @font-face
if (stylesheet != null) {
faceLoop: for(FontFace fontFace: stylesheet.getFontFaces()) {
for(FontFace.FontFaceSrc src: fontFace.getSources()) {
if (src.getType() == FontFace.FontFaceSrcType.URL) {
Font loadedFont = Font.loadFont(src.getSrc(),10);
getLogger().info("Loaded @font-face font [" + (loadedFont == null ? "null" : loadedFont.getName()) + "]");
continue faceLoop;
}
}
}
This needs to be fixed to resolve urls relative to the stylesheet.
}