Index: FontShorthandProperty.java
===================================================================
--- FontShorthandProperty.java	(revision 817715)
+++ FontShorthandProperty.java	(working copy)
@@ -24,6 +24,9 @@
 import org.apache.fop.fo.PropertyList;
 import org.apache.fop.fo.expr.PropertyException;
 
+import java.util.regex.Pattern;
+import java.util.regex.Matcher;
+
 /**
  * Property subclass for the font shorthand
  */
@@ -96,6 +99,20 @@
                          */
                         boolean fontFamilyParsed = false;
                         int commaIndex = value.indexOf(',');
+                        // no quotes and commas in font family is a special case
+                        if (quoteIndex == -1 && commaIndex == -1) {
+                            /* font family name will be last token when tokens viewed
+                             * in left to right order  as long as not comma-separated as well.
+                             */
+                            fromIndex = specVal.lastIndexOf(' ');
+                            if (fromIndex == -1) {
+                                // font shorthand cannot be single token
+                                throw new PropertyException("Invalid property value: "
+                                    + "font=\"" + value + "\"");
+                            }
+                            fromIndex += 1;
+                        }
+                        // calculate beginning of font-family token
                         while (!fontFamilyParsed) {
                             /* value contains a (list of) possibly quoted
                              * font-family name(s)
@@ -123,16 +140,61 @@
                                     quoteIndex = -1;
                                 } else {
                                     fromIndex = value.lastIndexOf(' ', commaIndex) + 1;
+                                    quoteIndex = -1;
                                 }
                                 commaIndex = -1;
                             }
                         }
                         toIndex = fromIndex - 1;
-                        fromIndex = value.lastIndexOf(' ', toIndex - 1) + 1;
+                        fromIndex = 0; // look at whole string from 0 (first) to toIndex
+                        // find values for font-size(/line-height)?
+                        // specify regular expressions that will be used
+                        /* term break look behnd, no hyphen or alphanumeric behind;
+                        or the beginning of the line */
+                        String tlb = "(?<=^|[^-a-zA-Z0-9])";
+                        /* term break look ahead, no hyphen or alphanumeric ahead;
+                           or the end of the line */
+                        String tla = "(?=[^-a-zA-Z0-9]|$)";
+                        // we need to avoid matching with small-caps from font-variant
+                        String absoluteSize = "(?:" + tlb
+                                + "(?:xx-small|x-small|small|medium|large|x-large|xx-large)"
+                                + tla + ")";
+                        String relativeSize = "(?:" + tlb + "(?:larger|smaller)" + tla + ")";
+                        String number = "[-+]?\\d+(?:\\.\\d+)?";
+                        String length = number + "(?:cm|mm|in|pt|pc|px|em)";
+                        String percentage = number + "%";
+                        String fontSizeRegEx = "(" + absoluteSize + "|" + relativeSize + "|"
+                                + length + "|" + percentage + "|" + "inherit" + ")";
+                        String lengthPercentageOrNumber = "(?:" + length + "|" + percentage
+                               + "|" + number + "|" + "inherit" + ")";
+                        String precedence = "(?:force|\\d+)";
+                        String conditionality = "(?:retain|discard)";
+                        String space = "(?:" + lengthPercentageOrNumber + "\\s*"
+                                + lengthPercentageOrNumber + "\\s*"
+                                + lengthPercentageOrNumber + "\\s*"
+                                + precedence + "\\s*" + conditionality + ")";
+                        String lineHeightRegEx = "(" + "normal"
+                                + "|" + lengthPercentageOrNumber + "|"
+                                + space + "|" + "inherit" + ")";
+                        String regexFontSizeLineHeight = fontSizeRegEx + "(?:"
+                                + "(?:" + "\\s*/\\s*" + ")"
+                                + "(" + lineHeightRegEx + ")" + ")?";
+                        Pattern pFontSizeLineHeight = Pattern.compile(regexFontSizeLineHeight);
                         value = specVal.substring(fromIndex, toIndex);
+                        Matcher mFontSizeLineHeight = pFontSizeLineHeight.matcher(value);
+                        String fontSize = "";
+                        String lineHeight = "";
+                        if (mFontSizeLineHeight.find()) {
+                            fontSize = mFontSizeLineHeight.group(1);
+
+                            fromIndex = mFontSizeLineHeight.start(1);
+                            lineHeight = mFontSizeLineHeight.group(2);
+                        }  else {
+                                throw new PropertyException("Invalid property value: "
+                                    + "font-size[/line-height]=\""
+                                        + value + "\"");                            
+                        }
                         int slashIndex = value.indexOf('/');
-                        String fontSize = value.substring(0,
-                                (slashIndex == -1) ? value.length() : slashIndex);
                         m = FObj.getPropertyMakerFor(PROP_IDS[0]);
                         prop = m.make(propertyList, fontSize, fo);
                         /* need to make sure subsequent call to LineHeightPropertyMaker.make()
@@ -142,7 +204,6 @@
                         newProp.addProperty(prop, 0);
                         if (slashIndex != -1) {
                             /* line-height */
-                            String lineHeight = value.substring(slashIndex + 1);
                             m = FObj.getPropertyMakerFor(PROP_IDS[2]);
                             prop = m.make(propertyList, lineHeight, fo);
                             newProp.addProperty(prop, 2);
