--- Comment #6 from Jonathan Levinson <> 2009-09-21 
13:29:20 PDT ---
Created an attachment (id=24298)
 --> (
Get font short hand completely working

I tested a variety of cases such as:

          <fo:block font="italic small-caps normal 12pt/150% Arial, Helvetica,
        <test:assert property="font-family" expected="[Arial, Helvetica,
sans-serif]" />
        <test:assert property="font-size" expected="12000mpt" />
        <test:assert property="font-weight" expected="400" />
        <test:assert property="font-style" expected="ITALIC" />
        <test:assert property="line-height.optimum" expected="18000mpt" />
        <test:assert property="font-variant" expected="SMALL_CAPS" />
        Test font shorthand

     <fo:block font="xx-large/1.4 Arial, 'Times New Roman', sans-serif">
        <test:assert property="font-family" expected="[Arial, Times New Roman,
        <test:assert property="font-size" expected="20736mpt"/>
        <test:assert property="font-weight" expected="400" />
        <test:assert property="font-style" expected="NORMAL" />
        <test:assert property="line-height.optimum" expected="29030mpt" />
        <test:assert property="font-variant" expected="NORMAL" />
        Test font shorthand

I think now works and does not need to be an LL(k)
or LR(k) parser.

The code looks complex but in each case of font property (such as font variant
or font family) it is defining a token to be parsed so it is is tokenizing
code.  It could probably be refactored to be easier to understand and read. 
The code is not parsing but tokenizing.

There is an additional remark I made about this solution (posted before).  The
solution seems to have been inadvertently ignored when the tests and patch I
made were marked as a duplicate.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to