Re: font-family="Arial Unicode MS" in rtf doesn't work

2007-02-20 Thread Andreas L Delmelle

On Feb 20, 2007, at 14:20, Jeff Vannest wrote:

Hi Jeff,

I've changed my opinion on this issue. The CSS spec on 'font- 
family' gives

this example in section 5.2.2 of the Level 1 spec, 11-JAN-1999:


Font names containing whitespace should be quoted:

BODY { font-family: "new century schoolbook", serif }




To me, this cannot be labeled a "workaround" in FOP, it is  
compliance with
the spec. Frankly, I've never seen single quotes within an  
attribute, and I
would have bet money otherwise, but it's clear as can be in the CSS  
spec.


Interesting info! Thanks for looking this up and sharing.
OTOH, now I'm wondering...
If you've never seen single quotes within an attribute, I bet you  
haven't looked too closely, or you just missed them --or you've never  
written stylesheets...? ;P


In XSLT these could turn out to appear far more often than you think:



I've even seen double quotes inside single quoted attributes, because  
that is equally valid XML




Cheers,

Andreas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: font-family="Arial Unicode MS" in rtf doesn't work

2007-02-20 Thread Jeff Vannest
> No, they didn't! My error report was cosed with the remark that
> in FOP the workaround is quoting. Yeah, but that's not the
> answer I would expect (ord accept) for such a
> (technically) minor bug. 

I've changed my opinion on this issue. The CSS spec on 'font-family' gives
this example in section 5.2.2 of the Level 1 spec, 11-JAN-1999:


Font names containing whitespace should be quoted:

BODY { font-family: "new century schoolbook", serif }
  



To me, this cannot be labeled a "workaround" in FOP, it is compliance with
the spec. Frankly, I've never seen single quotes within an attribute, and I
would have bet money otherwise, but it's clear as can be in the CSS spec.

The level 2 spec contains the same example of single quoting font names that
contain spaces.

As an aside, Altova StyleVision currently ships with FOP .25, and it does
not single quote fonts containing spaces, which causes the integrated FO
support to fail when identifying fonts by font-family. It's unfortunate, but
it looks to me like this is a bug in StyleVision that should be corrected by
Altova. Although, I have to admit that it would be nice if FOP were
"forgiving" of this, since I plan to roll out StyleVision to several
developers as our primary FO GUI to use with the latest Apache FOP version.

Jeff




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: font-family="Arial Unicode MS" in rtf doesn't work

2007-02-07 Thread Andreas L Delmelle

On Feb 7, 2007, at 20:25, Dominic Marcotte wrote:


Thanks Jeremias it's work!

If we want to use font name with whitespaces like "Arial Unicode  
MS", we must put it in quotes.


As Daniel pointed out: 'should', not 'must'.

Anyway, should work in FOP Trunk now w/o the quotes as well.



If I understand well, I think we can even do this

font-family="'Arial Unicode MS', 'Lucida Sans Unicode', sans-serif"


Yep, but AFAIK, currently FOP only uses the first one in the list  
(and does not use the others as fallbacks, yet)


Cheers,

Andreas


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re: font-family="Arial Unicode MS" in rtf doesn't work

2007-02-07 Thread Dominic Marcotte

Thanks Jeremias it's work!

If we want to use font name with whitespaces like "Arial Unicode MS", we 
must put it in quotes.


If I understand well, I think we can even do this

font-family="'Arial Unicode MS', 'Lucida Sans Unicode', sans-serif"

Dominic



Subject:
Re: font-family="Arial Unicode MS" in rtf doesn't work
From:
Jeremias Maerki <[EMAIL PROTECTED]>
Date:
Mon, 05 Feb 2007 23:03:04 +0100
To:
fop-users@xmlgraphics.apache.org

To:
fop-users@xmlgraphics.apache.org


Try font-family="'Arial Unicode MS'"

http://www.w3.org/TR/xsl11/#font-family says:
"Font family names containing whitespace should be quoted."

On 05.02.2007 22:36:32 Dominic Marcotte wrote:
  

Hello,

Font-family "Arial Unicode MS" in FO become "Arial" in RTF.

Like if font-family can't have a space in their name.

font-size="9.5pt">⇓




If I try with font-family "ArialUnicodeMS", I get "ArialUnicodeMS" in 
RTF but I Word or WordPad doesn't konw this font. I must change it 
manualy to "Arial Unicode MS".



I use "FOP Trunk" revision 499827.

Any suggestion?

Dominic





Jeremias Maerki
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: font-family="Arial Unicode MS" in rtf doesn't work

2007-02-06 Thread Jeff Vannest
I understand; it may be necessary to collapse multiple white space into a
single space before evaluation. Not that it is recommended as a solution to
something.



Jeff


-Original Message-
From: J.Pietschmann [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 06, 2007 4:29 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: font-family="Arial Unicode MS" in rtf doesn't work

Jeff Vannest wrote:
> Yeah, I'm not sure why anyone would want multiple spaces between words as
> previously quoted. I can't see how that would be desirable.

Line wrapping with indentation done by tools which take every
space as a line break opportunity.

J.Pietschmann

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: font-family="Arial Unicode MS" in rtf doesn't work

2007-02-06 Thread J.Pietschmann

Jeff Vannest wrote:

Yeah, I'm not sure why anyone would want multiple spaces between words as
previously quoted. I can't see how that would be desirable.


Line wrapping with indentation done by tools which take every
space as a line break opportunity.

J.Pietschmann

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: font-family="Arial Unicode MS" in rtf doesn't work

2007-02-06 Thread J.Pietschmann

Jeff Vannest wrote:

font-family="Arial Unicode MS" is already quoted, right?


Eh, not from the view point of the FO processor. The quotes
are for the XML parser, which passes the string 
(without the angle brackets) on to the FO processor, which has its
own rules about strings and quotations. Check the FO property grammar
for details.

J.Pietschmann

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: font-family="Arial Unicode MS" in rtf doesn't work

2007-02-06 Thread Jeff Vannest
>> Should be simple enough for someone who wants to get his feet wet...



> FWIW: already did this locally (incl. normalization of sequences of  
> more than one space).
> It all boils down to an added 35-40 lines of code...
>
> As soon as I'm 100% sure that the testcases that now fail, are  
> failing as a result of the previous patch being applied, I'll commit  
> the changes to the Trunk.

You almost had me convinced to take a stab at this one!

Yeah, I'm not sure why anyone would want multiple spaces between words as
previously quoted. I can't see how that would be desirable. In my case, I'm
using Altova StyleVision to generate XSL-FO files, and obviously that
product writes font families as they are declared locally, i.e., with single
spaces between words.

Jeff




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: font-family="Arial Unicode MS" in rtf doesn't work

2007-02-06 Thread Andreas L Delmelle

On Feb 6, 2007, at 07:22, Andreas L Delmelle wrote:



All that needs to be done, IIC, is to override Maker.make 
(PropertyList, String, FObj) in FontFamilyProperty. Note that this  
is about the only property that can contain spaces, where these  
spaces do /not/ signify boundaries between multiple values, as a  
list of font-families will be separated by commas.


Should be simple enough for someone who wants to get his feet  
wet... Might even take it on myself, if no one beats me to it.


FWIW: already did this locally (incl. normalization of sequences of  
more than one space).

It all boils down to an added 35-40 lines of code...

As soon as I'm 100% sure that the testcases that now fail, are  
failing as a result of the previous patch being applied, I'll commit  
the changes to the Trunk.



Cheers,

Andreas


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: font-family="Arial Unicode MS" in rtf doesn't work

2007-02-05 Thread Andreas L Delmelle

On Feb 6, 2007, at 03:59, Daniel Noll wrote:


Jeff Vannest wrote:

Jeremias Maerki wrote:

Try font-family="'Arial Unicode MS'"

http://www.w3.org/TR/xsl11/#font-family says:
"Font family names containing whitespace should be quoted."
font-family="Arial Unicode MS" is already quoted, right? To my  
knowledge,

all attribute values must be quoted in order to meet most SGML-based
specifications. I am not familiar with any cases where double- 
quoting values

should be recommended.


The reason is that the CSS specification (which XSL-FO happens to  
borrow from in this instance) recommends the quotes.


To make matters more interesting, the spec also says that a font  
family like "Arial  Unicode  MS" (no quotes, and note the double  
spaces) should also resolve back to "Arial Unicode MS" (single  
spaces).  FOP doesn't do any of this of course, it splits at the  
spaces, which is a spec violation the way I see it.


If anyone feels like fixing it, the problem is roughly:
the standard PropertyParser parses the property "Arial Unicode MS" as  
a ListProperty containing three StringProperties


All that needs to be done, IIC, is to override Maker.make 
(PropertyList, String, FObj) in FontFamilyProperty. Note that this is  
about the only property that can contain spaces, where these spaces  
do /not/ signify boundaries between multiple values, as a list of  
font-families will be separated by commas.


Should be simple enough for someone who wants to get his feet wet...  
Might even take it on myself, if no one beats me to it.



Cheers,

Andreas


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: font-family="Arial Unicode MS" in rtf doesn't work

2007-02-05 Thread Daniel Noll

Jeff Vannest wrote:

Jeremias Maerki wrote:

Try font-family="'Arial Unicode MS'"

http://www.w3.org/TR/xsl11/#font-family says:
"Font family names containing whitespace should be quoted."



font-family="Arial Unicode MS" is already quoted, right? To my knowledge,
all attribute values must be quoted in order to meet most SGML-based
specifications. I am not familiar with any cases where double-quoting values
should be recommended.


The reason is that the CSS specification (which XSL-FO happens to borrow 
from in this instance) recommends the quotes.


To make matters more interesting, the spec also says that a font family 
like "Arial  Unicode  MS" (no quotes, and note the double spaces) should 
also resolve back to "Arial Unicode MS" (single spaces).  FOP doesn't do 
any of this of course, it splits at the spaces, which is a spec 
violation the way I see it.


But at the same time, the spec does say it SHOULD be quoted, so you 
should quote it.


Daniel

--
Daniel Noll

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, AustraliaPh: +61 2 9280 0699
Web: http://nuix.com/   Fax: +61 2 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: font-family="Arial Unicode MS" in rtf doesn't work

2007-02-05 Thread Jeff Vannest
Jeremias Maerki wrote:
> Try font-family="'Arial Unicode MS'"
> 
> http://www.w3.org/TR/xsl11/#font-family says:
> "Font family names containing whitespace should be quoted."


font-family="Arial Unicode MS" is already quoted, right? To my knowledge,
all attribute values must be quoted in order to meet most SGML-based
specifications. I am not familiar with any cases where double-quoting values
should be recommended.

Jeremias, are you referring to a known bug?

Jeff




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: font-family="Arial Unicode MS" in rtf doesn't work

2007-02-05 Thread Daniel Noll

Jeremias Maerki wrote:

Try font-family="'Arial Unicode MS'"

http://www.w3.org/TR/xsl11/#font-family says:
"Font family names containing whitespace should be quoted."


...but not "must" ;-)

Still, this all sounds awfully familiar.

Interestingly, 0.20.5 did support it without spaces... at least as far 
as I remember.


Daniel


--
Daniel Noll

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, AustraliaPh: +61 2 9280 0699
Web: http://nuix.com/   Fax: +61 2 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: font-family="Arial Unicode MS" in rtf doesn't work

2007-02-05 Thread Jeremias Maerki
Try font-family="'Arial Unicode MS'"

http://www.w3.org/TR/xsl11/#font-family says:
"Font family names containing whitespace should be quoted."

On 05.02.2007 22:36:32 Dominic Marcotte wrote:
> Hello,
> 
> Font-family "Arial Unicode MS" in FO become "Arial" in RTF.
> 
> Like if font-family can't have a space in their name.
> 
>  font-size="9.5pt">⇓
> 
> 
> 
> If I try with font-family "ArialUnicodeMS", I get "ArialUnicodeMS" in 
> RTF but I Word or WordPad doesn't konw this font. I must change it 
> manualy to "Arial Unicode MS".
> 
> 
> I use "FOP Trunk" revision 499827.
> 
> Any suggestion?
> 
> Dominic



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: font-family="Arial Unicode MS" in rtf doesn't work

2007-02-05 Thread Jeff Vannest
I've noticed the same going to PDF. For some reason specifying "Arial
Unicode MS" is not honored. I worked around it by using the Arial
font-family and mapping the Arial triplets to the ARIALUNI.TTF in the
userconfig.xml.

Jeff


-Original Message-
From: Dominic Marcotte [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 05, 2007 4:37 PM
To: fop-users@xmlgraphics.apache.org
Subject: font-family="Arial Unicode MS" in rtf doesn't work

Hello,

Font-family "Arial Unicode MS" in FO become "Arial" in RTF.

Like if font-family can't have a space in their name.

?



If I try with font-family "ArialUnicodeMS", I get "ArialUnicodeMS" in 
RTF but I Word or WordPad doesn't konw this font. I must change it 
manualy to "Arial Unicode MS".


I use "FOP Trunk" revision 499827.

Any suggestion?

Dominic



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]