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

--- Comment #1 from Jonathan Levinson <levin...@intersystems.com> 2009-09-16 
10:52:07 PDT ---
Created an attachment (id=24277)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24277)
Allow case when no font-family is quoted and no comma-separated list of font
families

Allow case when no font-family is quoted and no comma-separated list of font
families.

The code in FontShorthandProperty is looking for the beginning of the
font-family.  If the font-family contains commas then the code works as before.
 If the font-family begins with a quote the code works as before.  There was
one case missing - when the code is looking for the beginning of the font
family but there are no commas and no quotes.

The font-family can be quite complex containing commas, single quoted strings,
double quote strings, and strings without quotes but the parsing of this
complex expression is taken care of by FontFamilyProperty.  All
FontShorthandProperty does is look for where the font-family begins.  It almost
did this correctly (before this patch) when the font-family contained commas or
consisted of a quoted string.  Now there is the case when the font-family
contains no quotes and no commas.

However, there is a fly in the ointment.  In testing this change (and in
testing the previous unchanged code), I added the following test case, which
fails in both cases.

     <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> 

There seems to be a problem when the quote follows a comma.  I will add a patch
to font-shorthand-test.fo which demonstrates this problem, and will continue to
diagnose the code to see what further problems in the code are causing this
problem.

-- 
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