// // Author: Yves Lafon // // (c) COPYRIGHT MIT, ERCIM, Keio, Beihang, 2018. // Please first read the full copyright statement in file COPYRIGHT.html package org.w3c.css.properties.css3.fontface; import org.w3c.css.util.ApplContext; import org.w3c.css.util.InvalidParamException; import org.w3c.css.values.CssExpression; import org.w3c.css.values.CssTypes; import org.w3c.css.values.CssValue; /** * @spec https://www.w3.org/TR/2026/WD-css-fonts-5-20260303/#descdef-font-face-size-adjust */ public class CssSizeAdjust extends org.w3c.css.properties.css.fontface.CssSizeAdjust { /** * Create a new CssSizeAdjust */ public CssSizeAdjust() { value = initial; } /** * Creates a new CssSizeAdjust * * @param expression The expression for this property * @throws InvalidParamException Expressions are incorrect */ public CssSizeAdjust(ApplContext ac, CssExpression expression, boolean check) throws InvalidParamException { if (check && expression.getCount() > 1) { throw new InvalidParamException("unrecognize", ac); } setByUser(); char op; CssValue val; val = expression.getValue(); op = expression.getOperator(); switch (val.getType()) { case CssTypes.CSS_PERCENTAGE: val.getCheckableValue().checkPositiveness(ac, this); value = val; break; default: throw new InvalidParamException("value", val.toString(), getPropertyName(), ac); } expression.next(); } public CssSizeAdjust(ApplContext ac, CssExpression expression) throws InvalidParamException { this(ac, expression, false); } }