--- Comment #1 from Jonathan Levinson <> 2009-09-16 
10:52:07 PDT ---
Created an attachment (id=24277)
 --> (
Allow case when no font-family is quoted and no comma-separated list of font

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

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

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

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

Reply via email to