*/
public Map createValues(LexicalUnit unit)
{
// todo we ignore the font-family system font styles for now.
CSSValue fontStyle = styleReadHandler.createValue(null, unit);
if (fontStyle != null)
{
unit = unit.getNextLexicalUnit();
if (unit == null)
{
return null;
}
}
CSSValue fontVariant = variantReadHandler.createValue(null, unit);
if (fontVariant != null)
{
unit = unit.getNextLexicalUnit();
if (unit == null)
{
return null;
}
}
CSSValue fontWeight = weightReadHandler.createValue(null, unit);
if (fontWeight != null)
{
unit = unit.getNextLexicalUnit();
if (unit == null)
{
return null;
}
}
CSSValue fontSize = sizeReadHandler.createValue(null, unit);
if (fontSize == null)
{
return null; // required value is missing
}
unit = unit.getNextLexicalUnit();
if (unit == null)
{
return null; // font family missing
}
CSSValue lineHeight = null;
if (unit.getLexicalUnitType() == LexicalUnit.SAC_OPERATOR_SLASH)
{
unit = unit.getNextLexicalUnit();
if (unit == null)
{
return null;
}
lineHeight = lineHeightReadHandler.createValue(null, unit);
if (lineHeight == null)
{
return null; // required sequence missing
}
unit = unit.getNextLexicalUnit();
if (unit == null)
{
return null;
}
}
CSSValue fontFamily = fontFamilyReadHandler.createValue(null, unit);
if (fontFamily == null)
{
return null; // font family is required!
}