https://issues.apache.org/bugzilla/show_bug.cgi?id=47709

--- Comment #6 from Jonathan Levinson <levin...@intersystems.com> 2009-09-21 
13:29:20 PDT ---
Created an attachment (id=24298)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?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,
sans-serif">
        <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> 

     <fo:block font="xx-large/1.4 Arial, 'Times New Roman', sans-serif">
        <test:assert property="font-family" expected="[Arial, Times New Roman,
sans-serif]"/>
        <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
      </fo:block>

I think FontShortHandProperty.java 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: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to