public static CSSFontFace createCSSFontFace(CSSEngine eng, FontFaceRule ffr) { StyleMap sm = ffr.getStyleMap(); String familyName = getStringProp (sm, eng, SVGCSSEngine.FONT_FAMILY_INDEX); v = sm.getValue(SVGCSSEngine.SRC_INDEX); ParsedURL base = ffr.getURL(); if ((v != null) && (v != ValueConstants.NONE_VALUE)) { if (v.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
/** * <b>SAC</b>: Implements {@link * org.w3c.css.sac.DocumentHandler#endFontFace()}. */ public void endFontFace() throws CSSException { StyleMap sm = new StyleMap(getNumberOfProperties()); int len = styleDeclaration.size(); for (int i=0; i<len; i++) { int idx = styleDeclaration.getIndex(i); sm.putValue(idx, styleDeclaration.getValue(i)); sm.putImportant(idx, styleDeclaration.getPriority(i)); // Not sure on this.. sm.putOrigin(idx, StyleMap.AUTHOR_ORIGIN); } styleDeclaration = null; int pidx = getPropertyIndex(CSSConstants.CSS_FONT_FAMILY_PROPERTY); Value fontFamily = sm.getValue(pidx); if (fontFamily == null) return; ParsedURL base = getCSSBaseURI(); fontFaces.add(new FontFaceRule(sm, base)); }
/** * <b>SAC</b>: Implements {@link * org.w3c.css.sac.DocumentHandler#endFontFace()}. */ public void endFontFace() throws CSSException { StyleMap sm = new StyleMap(getNumberOfProperties()); int len = styleDeclaration.size(); for (int i=0; i<len; i++) { int idx = styleDeclaration.getIndex(i); sm.putValue(idx, styleDeclaration.getValue(i)); sm.putImportant(idx, styleDeclaration.getPriority(i)); // Not sure on this.. sm.putOrigin(idx, StyleMap.AUTHOR_ORIGIN); } styleDeclaration = null; int pidx = getPropertyIndex(CSSConstants.CSS_FONT_FAMILY_PROPERTY); Value fontFamily = sm.getValue(pidx); if (fontFamily == null) return; ParsedURL base = getCSSBaseURI(); fontFaces.add(new FontFaceRule(sm, base)); }
public static CSSFontFace createCSSFontFace(CSSEngine eng, FontFaceRule ffr) { StyleMap sm = ffr.getStyleMap(); String familyName = getStringProp (sm, eng, SVGCSSEngine.FONT_FAMILY_INDEX); v = sm.getValue(SVGCSSEngine.SRC_INDEX); ParsedURL base = ffr.getURL(); if ((v != null) && (v != ValueConstants.NONE_VALUE)) { if (v.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
/** * <b>SAC</b>: Implements {@link * org.w3c.css.sac.DocumentHandler#endFontFace()}. */ public void endFontFace() throws CSSException { StyleMap sm = new StyleMap(getNumberOfProperties()); int len = styleDeclaration.size(); for (int i=0; i<len; i++) { int idx = styleDeclaration.getIndex(i); sm.putValue(idx, styleDeclaration.getValue(i)); sm.putImportant(idx, styleDeclaration.getPriority(i)); // Not sure on this.. sm.putOrigin(idx, StyleMap.AUTHOR_ORIGIN); } styleDeclaration = null; int pidx = getPropertyIndex(CSSConstants.CSS_FONT_FAMILY_PROPERTY); Value fontFamily = sm.getValue(pidx); if (fontFamily == null) return; ParsedURL base = getCSSBaseURI(); fontFaces.add(new FontFaceRule(sm, base)); }
public static CSSFontFace createCSSFontFace(CSSEngine eng, FontFaceRule ffr) { StyleMap sm = ffr.getStyleMap(); String familyName = getStringProp (sm, eng, SVGCSSEngine.FONT_FAMILY_INDEX); v = sm.getValue(SVGCSSEngine.SRC_INDEX); ParsedURL base = ffr.getURL(); if ((v != null) && (v != ValueConstants.NONE_VALUE)) { if (v.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {