Can't define multiple font-families in org.geotools.styling.FontImpl

4 messages Options
Embed this post
Permalink
Stefan Tzeggai

Can't define multiple font-families in org.geotools.styling.FontImpl

Reply Threaded More More options
Print post
Permalink
Hi everbody

Because font-families can not be assured to be installed on a system, SLD/SE
allows to define an ordered list of font family names to be tried. We see this
in org.opengis.style.Font interface:
>* The "font-family" SvgParameter element gives the family name of a font to
use.
>* Allowed values are system-dependent. Any number of font-family SvgParameter
>* elements may be given and they are assumed to be in preferred order.
>* @return live list of font family
>*/
>@XmlParameter("font-familly")
>List<Expression> getFamily();

But in Geotools 2.6-M2 org.geotools.styling.FontImpl an unmodifiable List is
returned and i see no way to configure or even initialize this list of familiy
names.
>    public List<Expression> getFamily() {
>        return Collections.unmodifiableList(fontFamily);
>    }

The JavaDoc in the interfaces org.opengis.style.Font and
org.geotools.styling.Font both explicitly state, that a "live list" should be
returned. I guess that means it should modifiable...

Many thanks for any help in advance...


Greetz
 Steve


--
wiki² - Softwareentwicklung
Stefan Krüger
Straßburger Weg 26
53113 Bonn

email [hidden email]
mobile 0151 50543949
webpage wikisquare.de
skype alfonx

reclaim your net - http://tor.eff.org
enforce privacy - http://www.pgpi.org
pgp key id: 51B576FD - http://pgp.mit.edu

Please note that according to the German law on data retention,
information on every electronic information exchange with me is
retained for a period of six months.



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
My last name will change from Krüger to Tzeggai in mid 2010.
Stefan Tzeggai

Re: Can't define multiple font-families in org.geotools.styling.FontImpl

Reply Threaded More More options
Print post
Permalink
Am Freitag 04 September 2009 09:49:04 schrieb Stefan Krüger:

> Hi everbody
>
> Because font-families can not be assured to be installed on a system,
> SLD/SE allows to define an ordered list of font family names to be tried.
> We see this
>
> in org.opengis.style.Font interface:
> >* The "font-family" SvgParameter element gives the family name of a font
> > to
>
> use.
>
> >* Allowed values are system-dependent. Any number of font-family
> > SvgParameter * elements may be given and they are assumed to be in
> > preferred order. * @return live list of font family
> >*/
> >@XmlParameter("font-familly")
> >List<Expression> getFamily();
>
> But in Geotools 2.6-M2 org.geotools.styling.FontImpl an unmodifiable List
> is returned and i see no way to configure or even initialize this list of
> familiy names.
>
> >    public List<Expression> getFamily() {
> >        return Collections.unmodifiableList(fontFamily);
> >    }
>
> The JavaDoc in the interfaces org.opengis.style.Font and
> org.geotools.styling.Font both explicitly state, that a "live list" should
> be returned. I guess that means it should modifiable...
>
> Many thanks for any help in advance...

I removed the "unmodifiableList" locally and it still doesn't work. It always
only exports the first font. So may i ask:

1. Does Geotool 2.6-M2 allow to load the definition of multiple font-families
from XML?
2. Does it allow to save the definition of multiple font-families to XML?
3. Does the API allow to manipulate it programatically?

If the answer to any of the questions is no.. i would like to write a patch -
if anyone gives me hope that it will be tested and comitted it before 2.6 gets
released.

Greetings from Bonn,
Steve

--
wiki² - Softwareentwicklung
Stefan Krüger
Straßburger Weg 26
53113 Bonn

email [hidden email]
mobile 0151 50543949
webpage wikisquare.de
skype alfonx

reclaim your net - http://tor.eff.org
enforce privacy - http://www.pgpi.org
pgp key id: 51B576FD - http://pgp.mit.edu

Please note that according to the German law on data retention,
information on every electronic information exchange with me is
retained for a period of six months.



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
My last name will change from Krüger to Tzeggai in mid 2010.
Jody Garnett-2

Re: Can't define multiple font-families in org.geotools.styling.FontImpl

Reply Threaded More More options
Print post
Permalink
In reply to this post by Stefan Tzeggai
Right you are - and this is one of the many fixes you get to look  
forward when I commit a patch for
- http://jira.codehaus.org/browse/GEOT-2692

Which I have just done now (thanks for reviewing Andrea).

This should be available via maven when the build box deploys tonight;  
so if you are using 2.6-SNAPSHOT you can give it a go right away.

I am going to leave this bug report open and ask for feedback on the  
style interfaces from the geotools-users list here (since I am sick of  
them being inconsistent and/or deprecated :-D ). If you find anything  
else Steve please speak up.

Cheers,
Jody

On 04/09/2009, at 5:49 PM, Stefan Krüger wrote:

> Hi everbody
>
> Because font-families can not be assured to be installed on a  
> system, SLD/SE
> allows to define an ordered list of font family names to be tried.  
> We see this
> in org.opengis.style.Font interface:
>> * The "font-family" SvgParameter element gives the family name of a  
>> font to
> use.
>> * Allowed values are system-dependent. Any number of font-family  
>> SvgParameter
>> * elements may be given and they are assumed to be in preferred  
>> order.
>> * @return live list of font family
>> */
>> @XmlParameter("font-familly")
>> List<Expression> getFamily();
>
> But in Geotools 2.6-M2 org.geotools.styling.FontImpl an unmodifiable  
> List is
> returned and i see no way to configure or even initialize this list  
> of familiy
> names.
>>   public List<Expression> getFamily() {
>>       return Collections.unmodifiableList(fontFamily);
>>   }
>
> The JavaDoc in the interfaces org.opengis.style.Font and
> org.geotools.styling.Font both explicitly state, that a "live list"  
> should be
> returned. I guess that means it should modifiable...
>
> Many thanks for any help in advance...
>
>
> Greetz
> Steve
>
>
> --
> wiki² - Softwareentwicklung
> Stefan Krüger
> Straßburger Weg 26
> 53113 Bonn
>
> email [hidden email]
> mobile 0151 50543949
> webpage wikisquare.de
> skype alfonx
>
> reclaim your net - http://tor.eff.org
> enforce privacy - http://www.pgpi.org
> pgp key id: 51B576FD - http://pgp.mit.edu
>
> Please note that according to the German law on data retention,
> information on every electronic information exchange with me is
> retained for a period of six months.
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
> 30-Day
> trial. Simplify your report design, integration and deployment - and  
> focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Geotools-gt2-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Jody Garnett-2

Re: Can't define multiple font-families in org.geotools.styling.FontImpl

Reply Threaded More More options
Print post
Permalink
In reply to this post by Stefan Tzeggai
On 04/09/2009, at 6:22 PM, Stefan Krüger wrote:

> I removed the "unmodifiableList" locally and it still doesn't work.  
> It always
> only exports the first font. So may i ask:
>
> 1. Does Geotool 2.6-M2 allow to load the definition of multiple font-
> families from XML?

The handling of Font's has been revised to match the "new" Symbology  
Encoding specification. Previously multiple Font entries were used;  
now they have a single Font entry with multiple font-famillies.

With that in mind our current SLDParser and encoder need to be  
updated. UOM was added last month; today it can be multiple font  
families.

> 2. Does it allow to save the definition of multiple font-families to  
> XML?
> 3. Does the API allow to manipulate it programatically?

As of 2 minuets ago; I am in the middle of a QA run in prep for a  
GeoTools 2.5 RC

> If the answer to any of the questions is no.. i would like to write  
> a patch -
> if anyone gives me hope that it will be tested and comitted it  
> before 2.6 gets
> released.

Yep! Bring it on :-)  We have one umber test case that can chew up SLD  
files and parse them; encoding them and compare the to the original -  
so please include an SLD file (or your own test case) showing that  
your patch works.

Jody
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users