Hi, I would like to un-deprecate all the multi-font methods that have been deprecated for a while in GeoTools, and that utterly broke multi-font support for a number of years.
The methods in questions are in this interface: https://github.com/geotools/geotools/blob/master/modules/library/api/src/main/java/org/geotools/styling/TextSymbolizer.java#L321 Why this was a mistake: * SLD 1.0 is still supported, and so we should avoid throwing away the extra fonts that can be declared as fallbacks like the current TextSymbolizerImpl does (in order to align with that deprecation) * SLD 1.0 is for once more expressive than SE 1.1, so deprecating those methods is a functional regression. The second statement warrants an explanation. In SE 1.1 a Font can have multiple font families, but can still have only one of the other attributes, so all font families are cast to use the same size... which is pretty ridiculous, I believe that everybody ever using a word processor noticed how monospaced fonts tend to be bigger than non monospaced ones, don't know about you, but I normally bring monospaced fonts size down 1 or 2 points to compensate. Or, you could be referring a font that's italic/scripty in its normal state (and don't want to slant it further), but as a fallback, you might want to ask for a Serif italic instead. Generally speaking, there are reasons why one would want to control size, weight and slant on a per fallback font basis, and SE does not allow that. The change requires to un-deprecate the methods in the interface, fix the implementation, and some bits of code that don't have support for multiple fonts (like DuplicatingStyleVisitor). The single font method versions would remain as support for SE, and to support the simple cases where the extra flexibility is not needed/desired. Btw, this is part of some work I'm doing to support multiscript labels, e.g., in some parts of China the OSM database has road names with a string having latin, chinese and arab chars (in the same string), and we'll leverage the ability to support multiple font families to specify which fonts to try in order to render the various parts of the string (this is going to be automatic). People using SE as the language will get a slightly crippled support, as they won't be able to fine tune the different font sizes and whatnot like those that use SLD 1.0 Of course, people using code to setup the styling won't have any problem :-p As a possible alternative, we could downgrade SLD 1.0 flexibility to SE 1.1 one, keep the deprecations, but TextSymbolizerImpl would still have to be modified not to eat away the extra fonts like it does today (SLDParser sets n fonts, TextSymbolizer retains only the first). CSS wise, there is not support for multiple fonts right now (not even for the family), not sure if I'll managed to work on that too, but it's unrelated (the limitation was already there) and the module is unsupported anyways. Cheers Andrea -- == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it *AVVERTENZE AI SENSI DEL D.Lgs. 196/2003* Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003. The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc. -------------------------------------------------------
------------------------------------------------------------------------------
_______________________________________________ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel