Merge remote-tracking branch 'upstream/expr-v2' into mla-expr-v2-renderer-common
|
@ -42,3 +42,7 @@ notifications:
|
|||
channels:
|
||||
- "irc.freenode.org#mapnik"
|
||||
use_notice: true
|
||||
email:
|
||||
on_success: [never]
|
||||
on_failure: [change]
|
||||
|
||||
|
|
45
bindings/python/mapnik_enumeration_wrapper_converter.hpp
Normal file
|
@ -0,0 +1,45 @@
|
|||
/*****************************************************************************
|
||||
*
|
||||
* This file is part of Mapnik (c++ mapping toolkit)
|
||||
*
|
||||
* Copyright (C) 2013 Artem Pavlenko
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef MAPNIK_BINDINGS_PYTHON_ENUMERATION_WRAPPPER
|
||||
#define MAPNIK_BINDINGS_PYTHON_ENUMERATION_WRAPPPER
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/symbolizer.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/python.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace python {
|
||||
|
||||
struct mapnik_enumeration_wrapper_to_python
|
||||
{
|
||||
static PyObject* convert(mapnik::enumeration_wrapper const& v)
|
||||
{
|
||||
return ::PyLong_FromLongLong(v.value); // FIXME: this is a temp hack!!
|
||||
}
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif // MAPNIK_BINDINGS_PYTHON_ENUMERATION_WRAPPPER
|
|
@ -98,6 +98,7 @@ void export_wkt_reader();
|
|||
#include "python_grid_utils.hpp"
|
||||
#endif
|
||||
#include "mapnik_value_converter.hpp"
|
||||
#include "mapnik_enumeration_wrapper_converter.hpp"
|
||||
#include "mapnik_threads.hpp"
|
||||
#include "python_optional.hpp"
|
||||
#include <mapnik/marker_cache.hpp>
|
||||
|
@ -877,4 +878,5 @@ BOOST_PYTHON_MODULE(_mapnik)
|
|||
register_ptr_to_python<mapnik::path_expression_ptr>();
|
||||
to_python_converter<mapnik::value_holder,mapnik_param_to_python>();
|
||||
to_python_converter<mapnik::value,mapnik_value_to_python>();
|
||||
to_python_converter<mapnik::enumeration_wrapper,mapnik_enumeration_wrapper_to_python>();
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ using mapnik::shield_symbolizer;
|
|||
using mapnik::text_symbolizer;
|
||||
using mapnik::building_symbolizer;
|
||||
using mapnik::markers_symbolizer;
|
||||
using mapnik::debug_symbolizer;
|
||||
using mapnik::symbolizer_base;
|
||||
using mapnik::color;
|
||||
using mapnik::path_processor_type;
|
||||
|
@ -72,12 +73,32 @@ using mapnik::parse_path;
|
|||
|
||||
namespace {
|
||||
using namespace boost::python;
|
||||
|
||||
void __setitem__(mapnik::symbolizer_base & sym, std::string const& name, mapnik::symbolizer_base::value_type const& val)
|
||||
{
|
||||
put(sym, mapnik::get_key(name), val);
|
||||
}
|
||||
|
||||
std::shared_ptr<mapnik::symbolizer_base::value_type> numeric_wrapper(const object& arg)
|
||||
{
|
||||
std::shared_ptr<mapnik::symbolizer_base::value_type> result;
|
||||
if (PyBool_Check(arg.ptr()))
|
||||
{
|
||||
mapnik::value_bool val = extract<mapnik::value_bool>(arg);
|
||||
result.reset(new mapnik::symbolizer_base::value_type(val));
|
||||
}
|
||||
else if (PyFloat_Check(arg.ptr()))
|
||||
{
|
||||
mapnik::value_double val = extract<mapnik::value_double>(arg);
|
||||
result.reset(new mapnik::symbolizer_base::value_type(val));
|
||||
}
|
||||
else
|
||||
{
|
||||
mapnik::value_integer val = extract<mapnik::value_integer>(arg);
|
||||
result.reset(new mapnik::symbolizer_base::value_type(val));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
struct extract_python_object : public boost::static_visitor<boost::python::object>
|
||||
{
|
||||
typedef boost::python::object result_type;
|
||||
|
@ -116,10 +137,11 @@ struct symbolizer_to_json : public boost::static_visitor<std::string>
|
|||
bool first = true;
|
||||
for (auto const& prop : sym.properties)
|
||||
{
|
||||
auto const& meta = mapnik::get_meta(prop.first);
|
||||
if (first) first = false;
|
||||
else ss << ",";
|
||||
ss << "\"" << std::get<0>(get_meta(prop.first)) << "\":";
|
||||
ss << "\"<property-value-fixme>\""; //prop.second ; FIXME
|
||||
ss << "\"" << std::get<0>(meta) << "\":";
|
||||
ss << boost::apply_visitor(mapnik::symbolizer_property_value_string<mapnik::property_meta_type>(meta),prop.second);
|
||||
}
|
||||
ss << "}}";
|
||||
return ss.str();
|
||||
|
@ -136,56 +158,6 @@ std::string get_symbolizer_type(symbolizer const& sym)
|
|||
return mapnik::symbolizer_name(sym); // FIXME - do we need this ?
|
||||
}
|
||||
|
||||
const point_symbolizer& point_(symbolizer const& sym )
|
||||
{
|
||||
return boost::get<point_symbolizer>(sym);
|
||||
}
|
||||
|
||||
const line_symbolizer& line_( const symbolizer& sym )
|
||||
{
|
||||
return boost::get<line_symbolizer>(sym);
|
||||
}
|
||||
|
||||
const polygon_symbolizer& polygon_( const symbolizer& sym )
|
||||
{
|
||||
return boost::get<polygon_symbolizer>(sym);
|
||||
}
|
||||
|
||||
const raster_symbolizer& raster_( const symbolizer& sym )
|
||||
{
|
||||
return boost::get<raster_symbolizer>(sym);
|
||||
}
|
||||
|
||||
const text_symbolizer& text_( const symbolizer& sym )
|
||||
{
|
||||
return boost::get<text_symbolizer>(sym);
|
||||
}
|
||||
|
||||
const shield_symbolizer& shield_( const symbolizer& sym )
|
||||
{
|
||||
return boost::get<shield_symbolizer>(sym);
|
||||
}
|
||||
|
||||
const line_pattern_symbolizer& line_pattern_( const symbolizer& sym )
|
||||
{
|
||||
return boost::get<line_pattern_symbolizer>(sym);
|
||||
}
|
||||
|
||||
const polygon_pattern_symbolizer& polygon_pattern_( const symbolizer& sym )
|
||||
{
|
||||
return boost::get<polygon_pattern_symbolizer>(sym);
|
||||
}
|
||||
|
||||
const building_symbolizer& building_( const symbolizer& sym )
|
||||
{
|
||||
return boost::get<building_symbolizer>(sym);
|
||||
}
|
||||
|
||||
const markers_symbolizer& markers_( const symbolizer& sym )
|
||||
{
|
||||
return boost::get<markers_symbolizer>(sym);
|
||||
}
|
||||
|
||||
struct symbolizer_hash_visitor : public boost::static_visitor<std::size_t>
|
||||
{
|
||||
template <typename T>
|
||||
|
@ -200,18 +172,39 @@ std::size_t hash_impl(symbolizer const& sym)
|
|||
return boost::apply_visitor(symbolizer_hash_visitor(), sym);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
std::size_t hash_impl_2(T const& sym)
|
||||
{
|
||||
return mapnik::symbolizer_hash::value<T>(sym);
|
||||
}
|
||||
|
||||
struct extract_underlying_type_visitor : boost::static_visitor<boost::python::object>
|
||||
{
|
||||
template <typename T>
|
||||
boost::python::object operator() (T const& sym) const
|
||||
{
|
||||
return boost::python::object(sym);
|
||||
}
|
||||
};
|
||||
|
||||
boost::python::object extract_underlying_type(symbolizer const& sym)
|
||||
{
|
||||
return boost::apply_visitor(extract_underlying_type_visitor(), sym);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void export_symbolizer()
|
||||
{
|
||||
using namespace boost::python;
|
||||
|
||||
//implicitly_convertible<mapnik::value_bool, mapnik::symbolizer_base::value_type>();
|
||||
implicitly_convertible<mapnik::value_integer, mapnik::symbolizer_base::value_type>();
|
||||
implicitly_convertible<mapnik::value_double, mapnik::symbolizer_base::value_type>();
|
||||
implicitly_convertible<std::string, mapnik::symbolizer_base::value_type>();
|
||||
implicitly_convertible<mapnik::color, mapnik::symbolizer_base::value_type>();
|
||||
implicitly_convertible<mapnik::expression_ptr, mapnik::symbolizer_base::value_type>();
|
||||
implicitly_convertible<mapnik::value_integer, mapnik::symbolizer_base::value_type>();
|
||||
implicitly_convertible<mapnik::value_double, mapnik::symbolizer_base::value_type>();
|
||||
implicitly_convertible<mapnik::value_bool, mapnik::symbolizer_base::value_type>();
|
||||
implicitly_convertible<mapnik::enumeration_wrapper, mapnik::symbolizer_base::value_type>();
|
||||
|
||||
enum_<mapnik::keys>("keys")
|
||||
.value("gamma", mapnik::keys::gamma)
|
||||
|
@ -221,26 +214,11 @@ void export_symbolizer()
|
|||
class_<symbolizer>("Symbolizer",no_init)
|
||||
.def("type",get_symbolizer_type)
|
||||
.def("__hash__",hash_impl)
|
||||
.def("point",point_,
|
||||
return_value_policy<copy_const_reference>())
|
||||
.def("line",line_,
|
||||
return_value_policy<copy_const_reference>())
|
||||
.def("line_pattern",line_pattern_,
|
||||
return_value_policy<copy_const_reference>())
|
||||
.def("polygon",polygon_,
|
||||
return_value_policy<copy_const_reference>())
|
||||
.def("polygon_pattern",polygon_pattern_,
|
||||
return_value_policy<copy_const_reference>())
|
||||
.def("raster",raster_,
|
||||
return_value_policy<copy_const_reference>())
|
||||
.def("shield",shield_,
|
||||
return_value_policy<copy_const_reference>())
|
||||
.def("text",text_,
|
||||
return_value_policy<copy_const_reference>())
|
||||
.def("building",building_,
|
||||
return_value_policy<copy_const_reference>())
|
||||
.def("markers",markers_,
|
||||
return_value_policy<copy_const_reference>())
|
||||
.def("extract", extract_underlying_type)
|
||||
;
|
||||
|
||||
class_<symbolizer_base::value_type>("NumericWrapper")
|
||||
.def("__init__", make_constructor(numeric_wrapper))
|
||||
;
|
||||
|
||||
class_<symbolizer_base>("SymbolizerBase",no_init)
|
||||
|
@ -249,6 +227,7 @@ void export_symbolizer()
|
|||
.def("__getitem__",&__getitem__)
|
||||
.def("__getattr__",&__getitem__)
|
||||
.def("__str__", &__str__)
|
||||
.def(self == self) // __eq__
|
||||
;
|
||||
}
|
||||
|
||||
|
@ -258,6 +237,7 @@ void export_shield_symbolizer()
|
|||
using namespace boost::python;
|
||||
class_< shield_symbolizer, bases<text_symbolizer> >("ShieldSymbolizer",
|
||||
init<>("Default ctor"))
|
||||
.def("__hash__",hash_impl_2<shield_symbolizer>)
|
||||
;
|
||||
|
||||
}
|
||||
|
@ -268,6 +248,7 @@ void export_polygon_symbolizer()
|
|||
|
||||
class_<polygon_symbolizer, bases<symbolizer_base> >("PolygonSymbolizer",
|
||||
init<>("Default ctor"))
|
||||
.def("__hash__",hash_impl_2<polygon_symbolizer>)
|
||||
;
|
||||
|
||||
}
|
||||
|
@ -283,10 +264,10 @@ void export_polygon_pattern_symbolizer()
|
|||
|
||||
class_<polygon_pattern_symbolizer>("PolygonPatternSymbolizer",
|
||||
init<>("Default ctor"))
|
||||
.def("__hash__",hash_impl_2<polygon_pattern_symbolizer>)
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
void export_raster_symbolizer()
|
||||
{
|
||||
using namespace boost::python;
|
||||
|
@ -307,6 +288,7 @@ void export_point_symbolizer()
|
|||
|
||||
class_<point_symbolizer, bases<symbolizer_base> >("PointSymbolizer",
|
||||
init<>("Default Point Symbolizer - 4x4 black square"))
|
||||
.def("__hash__",hash_impl_2<point_symbolizer>)
|
||||
;
|
||||
}
|
||||
|
||||
|
@ -328,6 +310,7 @@ void export_markers_symbolizer()
|
|||
|
||||
class_<markers_symbolizer, bases<symbolizer_base> >("MarkersSymbolizer",
|
||||
init<>("Default Markers Symbolizer - circle"))
|
||||
.def("__hash__",hash_impl_2<markers_symbolizer>)
|
||||
;
|
||||
}
|
||||
|
||||
|
@ -335,13 +318,33 @@ void export_markers_symbolizer()
|
|||
void export_line_symbolizer()
|
||||
{
|
||||
using namespace boost::python;
|
||||
|
||||
mapnik::enumeration_<mapnik::line_rasterizer_e>("line_rasterizer")
|
||||
.value("FULL",mapnik::RASTERIZER_FULL)
|
||||
.value("FAST",mapnik::RASTERIZER_FAST)
|
||||
;
|
||||
|
||||
mapnik::enumeration_<mapnik::line_cap_e>("stroke_linecap",
|
||||
"The possible values for a line cap used when drawing\n"
|
||||
"with a stroke.\n")
|
||||
.value("BUTT_CAP",mapnik::BUTT_CAP)
|
||||
.value("SQUARE_CAP",mapnik::SQUARE_CAP)
|
||||
.value("ROUND_CAP",mapnik::ROUND_CAP)
|
||||
;
|
||||
|
||||
mapnik::enumeration_<mapnik::line_join_e>("stroke_linejoin",
|
||||
"The possible values for the line joining mode\n"
|
||||
"when drawing with a stroke.\n")
|
||||
.value("MITER_JOIN",mapnik::MITER_JOIN)
|
||||
.value("MITER_REVERT_JOIN",mapnik::MITER_REVERT_JOIN)
|
||||
.value("ROUND_JOIN",mapnik::ROUND_JOIN)
|
||||
.value("BEVEL_JOIN",mapnik::BEVEL_JOIN)
|
||||
;
|
||||
|
||||
|
||||
class_<line_symbolizer, bases<symbolizer_base> >("LineSymbolizer",
|
||||
init<>("Default LineSymbolizer - 1px solid black"))
|
||||
.def("__hash__",hash_impl_2<line_symbolizer>)
|
||||
;
|
||||
}
|
||||
|
||||
|
@ -351,6 +354,7 @@ void export_line_pattern_symbolizer()
|
|||
|
||||
class_<line_pattern_symbolizer, bases<symbolizer_base> >("LinePatternSymbolizer",
|
||||
init<> ("Default LinePatternSymbolizer"))
|
||||
.def("__hash__",hash_impl_2<line_pattern_symbolizer>)
|
||||
;
|
||||
}
|
||||
|
||||
|
@ -363,8 +367,9 @@ void export_debug_symbolizer()
|
|||
.value("VERTEX",mapnik::DEBUG_SYM_MODE_VERTEX)
|
||||
;
|
||||
|
||||
class_<mapnik::debug_symbolizer, bases<symbolizer_base> >("DebugSymbolizer",
|
||||
class_<debug_symbolizer, bases<symbolizer_base> >("DebugSymbolizer",
|
||||
init<>("Default debug Symbolizer"))
|
||||
.def("__hash__",hash_impl_2<debug_symbolizer>)
|
||||
;
|
||||
}
|
||||
|
||||
|
@ -374,6 +379,7 @@ void export_building_symbolizer()
|
|||
|
||||
class_<building_symbolizer, bases<symbolizer_base> >("BuildingSymbolizer",
|
||||
init<>("Default BuildingSymbolizer"))
|
||||
.def("__hash__",hash_impl_2<building_symbolizer>)
|
||||
;
|
||||
|
||||
}
|
||||
|
|
|
@ -38,12 +38,12 @@ namespace boost { namespace python {
|
|||
return ::PyLong_FromLongLong(val);
|
||||
}
|
||||
|
||||
PyObject * operator() (double val) const
|
||||
PyObject * operator() (mapnik::value_double val) const
|
||||
{
|
||||
return ::PyFloat_FromDouble(val);
|
||||
}
|
||||
|
||||
PyObject * operator() (bool val) const
|
||||
PyObject * operator() (mapnik::value_bool val) const
|
||||
{
|
||||
return ::PyBool_FromLong(val);
|
||||
}
|
||||
|
|
|
@ -424,8 +424,6 @@ void feature_style_processor<Processor>::prepare_layer(layer_rendering_material
|
|||
}
|
||||
}
|
||||
|
||||
p.start_layer_processing(lay, layer_ext2);
|
||||
|
||||
std::vector<rule_cache> & rule_caches = mat.rule_caches_;
|
||||
attribute_collector collector(names);
|
||||
|
||||
|
|
|
@ -312,7 +312,8 @@ struct extract_raw_value : public boost::static_visitor<T1>
|
|||
template <typename T>
|
||||
void put(symbolizer_base & sym, keys key, T const& val)
|
||||
{
|
||||
detail::put_impl<T, std::is_enum<T>::value >::apply(sym, key, val);
|
||||
constexpr bool enum_ = std::is_enum<T>::value;
|
||||
detail::put_impl<T, enum_ >::apply(sym, key, val);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
|
||||
// mapnik
|
||||
#include <mapnik/symbolizer.hpp>
|
||||
#include <mapnik/transform_processor.hpp>
|
||||
#include <mapnik/expression_string.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/variant/apply_visitor.hpp>
|
||||
|
||||
|
@ -123,6 +126,95 @@ std::string symbolizer_name(symbolizer const& sym)
|
|||
return type;
|
||||
}
|
||||
|
||||
|
||||
template <typename Meta>
|
||||
class symbolizer_property_value_string : public boost::static_visitor<std::string>
|
||||
{
|
||||
public:
|
||||
symbolizer_property_value_string (Meta const& meta)
|
||||
: meta_(meta) {}
|
||||
|
||||
std::string operator() ( mapnik::enumeration_wrapper const& e) const
|
||||
{
|
||||
std::stringstream ss;
|
||||
auto const& convert_fun_ptr(std::get<2>(meta_));
|
||||
if ( convert_fun_ptr )
|
||||
{
|
||||
ss << convert_fun_ptr(e);
|
||||
}
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
std::string operator () ( path_expression_ptr const& expr) const
|
||||
{
|
||||
std::ostringstream ss;
|
||||
if (expr)
|
||||
{
|
||||
ss << '\"' << path_processor::to_string(*expr) << '\"';
|
||||
}
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
std::string operator () (text_placements_ptr const& expr) const
|
||||
{
|
||||
return std::string("\"<fixme-text-placement-ptr>\"");
|
||||
}
|
||||
|
||||
std::string operator () (raster_colorizer_ptr const& expr) const
|
||||
{
|
||||
return std::string("\"<fixme-raster-colorizer-ptr>\"");
|
||||
}
|
||||
|
||||
std::string operator () (transform_type const& expr) const
|
||||
{
|
||||
std::ostringstream ss;
|
||||
if (expr)
|
||||
{
|
||||
ss << '\"' << transform_processor_type::to_string(*expr) << '\"';
|
||||
}
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
std::string operator () (expression_ptr const& expr) const
|
||||
{
|
||||
std::ostringstream ss;
|
||||
if (expr)
|
||||
{
|
||||
ss << '\"' << mapnik::to_expression_string(*expr) << '\"';
|
||||
}
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
std::string operator () (color const& c) const
|
||||
{
|
||||
std::ostringstream ss;
|
||||
ss << '\"' << c << '\"';
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
std::string operator () (dash_array const& dash) const
|
||||
{
|
||||
std::ostringstream ss;
|
||||
for (std::size_t i = 0; i < dash.size(); ++i)
|
||||
{
|
||||
ss << dash[i].first << ", " << dash[i].second;
|
||||
if ( i + 1 < dash.size() ) ss << ',';
|
||||
}
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
std::string operator () ( T const& val ) const
|
||||
{
|
||||
std::ostringstream ss;
|
||||
ss << val;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
private:
|
||||
Meta const& meta_;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif // MAPNIK_SYMBOLIZER_UTILS_HPP
|
||||
|
|
170
src/load_map.cpp
|
@ -73,7 +73,13 @@ namespace mapnik
|
|||
{
|
||||
using boost::optional;
|
||||
|
||||
class map_parser : mapnik::noncopyable {
|
||||
constexpr unsigned name2int(const char *str, int off = 0)
|
||||
{
|
||||
return !str[off] ? 5381 : (name2int(str, off+1)*33) ^ str[off];
|
||||
}
|
||||
|
||||
class map_parser : mapnik::noncopyable
|
||||
{
|
||||
public:
|
||||
map_parser(bool strict, std::string const& filename = "") :
|
||||
strict_(strict),
|
||||
|
@ -476,19 +482,17 @@ void map_parser::parse_style(Map & map, xml_node const& sty)
|
|||
}
|
||||
|
||||
// rules
|
||||
xml_node::const_iterator ruleIter = sty.begin();
|
||||
xml_node::const_iterator endRule = sty.end();
|
||||
|
||||
for (; ruleIter!=endRule; ++ruleIter)
|
||||
for (auto const& rule_ : sty)
|
||||
{
|
||||
if (ruleIter->is("Rule"))
|
||||
if (rule_.is("Rule"))
|
||||
{
|
||||
parse_rule(style, *ruleIter);
|
||||
parse_rule(style, rule_);
|
||||
}
|
||||
}
|
||||
|
||||
map.insert_style(name, style);
|
||||
} catch (config_error const& ex) {
|
||||
}
|
||||
catch (config_error const& ex)
|
||||
{
|
||||
ex.append_context(std::string("in style '") + name + "'", sty);
|
||||
throw;
|
||||
}
|
||||
|
@ -751,91 +755,92 @@ void map_parser::parse_layer(Map & map, xml_node const& node)
|
|||
}
|
||||
}
|
||||
|
||||
void map_parser::parse_rule(feature_type_style & style, xml_node const& r)
|
||||
void map_parser::parse_rule(feature_type_style & style, xml_node const& node)
|
||||
{
|
||||
std::string name;
|
||||
try
|
||||
{
|
||||
name = r.get_attr("name", std::string());
|
||||
name = node.get_attr("name", std::string());
|
||||
rule rule(name);
|
||||
|
||||
xml_node const* child = r.get_opt_child("Filter");
|
||||
xml_node const* child = node.get_opt_child("Filter");
|
||||
if (child)
|
||||
{
|
||||
rule.set_filter(child->get_value<expression_ptr>());
|
||||
}
|
||||
|
||||
if (r.has_child("ElseFilter"))
|
||||
if (node.has_child("ElseFilter"))
|
||||
{
|
||||
rule.set_else(true);
|
||||
}
|
||||
|
||||
if (r.has_child("AlsoFilter"))
|
||||
if (node.has_child("AlsoFilter"))
|
||||
{
|
||||
rule.set_also(true);
|
||||
}
|
||||
|
||||
child = r.get_opt_child("MinScaleDenominator");
|
||||
child = node.get_opt_child("MinScaleDenominator");
|
||||
if (child)
|
||||
{
|
||||
rule.set_min_scale(child->get_value<double>());
|
||||
}
|
||||
|
||||
child = r.get_opt_child("MaxScaleDenominator");
|
||||
child = node.get_opt_child("MaxScaleDenominator");
|
||||
if (child)
|
||||
{
|
||||
rule.set_max_scale(child->get_value<double>());
|
||||
}
|
||||
|
||||
xml_node::const_iterator symIter = r.begin();
|
||||
xml_node::const_iterator endSym = r.end();
|
||||
|
||||
for(;symIter != endSym; ++symIter)
|
||||
for (auto const& sym_node : node)
|
||||
{
|
||||
|
||||
if (symIter->is("PointSymbolizer"))
|
||||
switch (name2int(sym_node.name().c_str()))
|
||||
{
|
||||
parse_point_symbolizer(rule, *symIter);
|
||||
}
|
||||
else if (symIter->is("LinePatternSymbolizer"))
|
||||
{
|
||||
parse_line_pattern_symbolizer(rule, *symIter);
|
||||
}
|
||||
else if (symIter->is("PolygonPatternSymbolizer"))
|
||||
{
|
||||
parse_polygon_pattern_symbolizer(rule, *symIter);
|
||||
}
|
||||
else if (symIter->is("TextSymbolizer"))
|
||||
{
|
||||
parse_text_symbolizer(rule, *symIter);
|
||||
}
|
||||
else if (symIter->is("ShieldSymbolizer"))
|
||||
{
|
||||
parse_shield_symbolizer(rule, *symIter);
|
||||
}
|
||||
else if (symIter->is("LineSymbolizer"))
|
||||
{
|
||||
parse_line_symbolizer(rule, *symIter);
|
||||
}
|
||||
else if (symIter->is("PolygonSymbolizer"))
|
||||
{
|
||||
parse_polygon_symbolizer(rule, *symIter);
|
||||
}
|
||||
else if (symIter->is("BuildingSymbolizer"))
|
||||
{
|
||||
parse_building_symbolizer(rule, *symIter);
|
||||
}
|
||||
else if (symIter->is("RasterSymbolizer"))
|
||||
{
|
||||
parse_raster_symbolizer(rule, *symIter);
|
||||
}
|
||||
else if (symIter->is("MarkersSymbolizer"))
|
||||
{
|
||||
parse_markers_symbolizer(rule, *symIter);
|
||||
}
|
||||
else if (symIter->is("DebugSymbolizer"))
|
||||
{
|
||||
parse_debug_symbolizer(rule, *symIter);
|
||||
case name2int("PointSymbolizer"):
|
||||
parse_point_symbolizer(rule, sym_node);
|
||||
sym_node.set_processed(true);
|
||||
break;
|
||||
case name2int("LinePatternSymbolizer"):
|
||||
parse_line_pattern_symbolizer(rule, sym_node);
|
||||
sym_node.set_processed(true);
|
||||
break;
|
||||
case name2int("PolygonPatternSymbolizer"):
|
||||
parse_polygon_pattern_symbolizer(rule, sym_node);
|
||||
sym_node.set_processed(true);
|
||||
break;
|
||||
case name2int("TextSymbolizer"):
|
||||
parse_text_symbolizer(rule, sym_node);
|
||||
sym_node.set_processed(true);
|
||||
break;
|
||||
case name2int("ShieldSymbolizer"):
|
||||
parse_shield_symbolizer(rule, sym_node);
|
||||
sym_node.set_processed(true);
|
||||
break;
|
||||
case name2int("LineSymbolizer"):
|
||||
parse_line_symbolizer(rule, sym_node);
|
||||
sym_node.set_processed(true);
|
||||
break;
|
||||
case name2int("PolygonSymbolizer"):
|
||||
parse_polygon_symbolizer(rule, sym_node);
|
||||
sym_node.set_processed(true);
|
||||
break;
|
||||
case name2int("BuildingSymbolizer"):
|
||||
parse_building_symbolizer(rule, sym_node);
|
||||
sym_node.set_processed(true);
|
||||
break;
|
||||
case name2int("RasterSymbolizer"):
|
||||
parse_raster_symbolizer(rule, sym_node);
|
||||
sym_node.set_processed(true);
|
||||
break;
|
||||
case name2int("MarkersSymbolizer"):
|
||||
parse_markers_symbolizer(rule, sym_node);
|
||||
sym_node.set_processed(true);
|
||||
break;
|
||||
case name2int("DebugSymbolizer"):
|
||||
parse_debug_symbolizer(rule, sym_node);
|
||||
sym_node.set_processed(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
style.add_rule(rule);
|
||||
|
@ -845,7 +850,7 @@ void map_parser::parse_rule(feature_type_style & style, xml_node const& r)
|
|||
{
|
||||
if (!name.empty())
|
||||
{
|
||||
ex.append_context(std::string("in rule '") + name + "'", r);
|
||||
ex.append_context(std::string("in rule '") + name + "'", node);
|
||||
}
|
||||
throw;
|
||||
}
|
||||
|
@ -932,6 +937,7 @@ void map_parser::parse_point_symbolizer(rule & rule, xml_node const & sym)
|
|||
optional<boolean> allow_overlap = sym.get_opt_attr<boolean>("allow-overlap");
|
||||
optional<boolean> ignore_placement = sym.get_opt_attr<boolean>("ignore-placement");
|
||||
optional<double> opacity = sym.get_opt_attr<double>("opacity");
|
||||
optional<std::string> image_transform_wkt = sym.get_opt_attr<std::string>("transform");
|
||||
|
||||
point_symbolizer symbol;
|
||||
if (allow_overlap) put(symbol, keys::allow_overlap, *allow_overlap);
|
||||
|
@ -957,7 +963,6 @@ void map_parser::parse_point_symbolizer(rule & rule, xml_node const & sym)
|
|||
ensure_exists(filename);
|
||||
put(symbol, keys::file, parse_path(filename, sym.get_tree().path_expr_grammar));
|
||||
|
||||
optional<std::string> image_transform_wkt = sym.get_opt_attr<std::string>("transform");
|
||||
if (image_transform_wkt)
|
||||
{
|
||||
mapnik::transform_list_ptr tl = std::make_shared<mapnik::transform_list>();
|
||||
|
@ -1505,18 +1510,15 @@ void map_parser::parse_raster_symbolizer(rule & rule, xml_node const & sym)
|
|||
optional<boolean> premultiplied = sym.get_opt_attr<boolean>("premultiplied");
|
||||
if (premultiplied) put(raster_sym, keys::premultiplied, *premultiplied);
|
||||
|
||||
xml_node::const_iterator cssIter = sym.begin();
|
||||
xml_node::const_iterator endCss = sym.end();
|
||||
|
||||
bool found_colorizer = false;
|
||||
for(; cssIter != endCss; ++cssIter)
|
||||
for ( auto const& css : sym)
|
||||
{
|
||||
if (cssIter->is("RasterColorizer"))
|
||||
if (css.is("RasterColorizer"))
|
||||
{
|
||||
found_colorizer = true;
|
||||
raster_colorizer_ptr colorizer = std::make_shared<raster_colorizer>();
|
||||
put(raster_sym, keys::colorizer, colorizer);
|
||||
if (parse_raster_colorizer(colorizer, *cssIter))
|
||||
if (parse_raster_colorizer(colorizer, css))
|
||||
put(raster_sym, keys::colorizer, colorizer);
|
||||
}
|
||||
}
|
||||
|
@ -1696,30 +1698,30 @@ void map_parser::find_unused_nodes_recursive(xml_node const& node, std::string &
|
|||
{
|
||||
if (!node.processed())
|
||||
{
|
||||
if (node.is_text()) {
|
||||
if (node.is_text())
|
||||
{
|
||||
error_message += "\n* text '" + node.text() + "'";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
error_message += "\n* node '" + node.name() + "' at line " + node.line_to_string();
|
||||
}
|
||||
return; //All attributes and children are automatically unprocessed, too.
|
||||
}
|
||||
xml_node::attribute_map const& attr = node.get_attributes();
|
||||
xml_node::attribute_map::const_iterator aitr = attr.begin();
|
||||
xml_node::attribute_map::const_iterator aend = attr.end();
|
||||
for (;aitr!=aend; aitr++)
|
||||
xml_node::attribute_map const& attrs = node.get_attributes();
|
||||
for (auto const& attr : attrs)
|
||||
{
|
||||
if (!aitr->second.processed)
|
||||
if (!attr.second.processed)
|
||||
{
|
||||
error_message += "\n* attribute '" + aitr->first +
|
||||
"' with value '" + aitr->second.value +
|
||||
error_message += "\n* attribute '" + attr.first +
|
||||
"' with value '" + attr.second.value +
|
||||
"' at line " + node.line_to_string();
|
||||
}
|
||||
}
|
||||
xml_node::const_iterator itr = node.begin();
|
||||
xml_node::const_iterator end = node.end();
|
||||
for (; itr!=end; itr++)
|
||||
|
||||
for (auto const& child_node : node)
|
||||
{
|
||||
find_unused_nodes_recursive(*itr, error_message);
|
||||
find_unused_nodes_recursive(child_node, error_message);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ template <typename Meta>
|
|||
class serialize_symbolizer_property : public boost::static_visitor<>
|
||||
{
|
||||
public:
|
||||
serialize_symbolizer_property(Meta meta,
|
||||
serialize_symbolizer_property(Meta const& meta,
|
||||
boost::property_tree::ptree & node)
|
||||
: meta_(meta),
|
||||
node_(node) {}
|
||||
|
@ -194,7 +194,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
Meta meta_;
|
||||
Meta const& meta_;
|
||||
boost::property_tree::ptree & node_;
|
||||
};
|
||||
|
||||
|
|
23
tests/data/good_maps/frame.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
<Map srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
|
||||
|
||||
<Style name="frame">
|
||||
<Rule>
|
||||
<PointSymbolizer transform="scale(1,1)"/>
|
||||
</Rule>
|
||||
</Style>
|
||||
|
||||
<Layer name="frame" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
|
||||
<StyleName>frame</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="type">csv</Parameter>
|
||||
<Parameter name="inline">
|
||||
x,y
|
||||
0,0
|
||||
5,0
|
||||
0,5
|
||||
5,5
|
||||
</Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
|
||||
</Map>
|
|
@ -45,14 +45,14 @@ def test_good_files():
|
|||
for filename in good_files:
|
||||
try:
|
||||
m = mapnik.Map(512, 512)
|
||||
strict = False
|
||||
strict = True
|
||||
mapnik.load_map(m, filename, strict)
|
||||
base_path = os.path.dirname(filename)
|
||||
mapnik.load_map_from_string(m,open(filename,'rb').read(),strict,base_path)
|
||||
except RuntimeError, e:
|
||||
# only test datasources that we have installed
|
||||
if not 'Could not create datasource' in str(e):
|
||||
failures.append('Failed to load valid map (%s)!' % filename)
|
||||
failures.append('Failed to load valid map %s (%s)' % (filename,e))
|
||||
eq_(len(failures),0,'\n'+'\n'.join(failures))
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
28
tests/visual_tests/fonts/KhmerOS/copyright
Normal file
|
@ -0,0 +1,28 @@
|
|||
This package was adopted by Soputtra San <ekenno@gmail.com> on
|
||||
Mon, 23 Jul 2007 11:04:29 +1000
|
||||
|
||||
This package was debianized by Paul Wise <pabs@debian.org> on
|
||||
Wed, 14 Sep 2005 15:45:30 +0800.
|
||||
|
||||
It was downloaded from http://www.khmeros.info/drupal/?q=en/download/fonts
|
||||
|
||||
Copyright:
|
||||
|
||||
Copyright 2005, 2006 Danh Hong
|
||||
Copyright 2005, 2006 Open Forum of Cambodia
|
||||
|
||||
License:
|
||||
|
||||
This font is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published
|
||||
by the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
License for more details.
|
||||
|
||||
On Debian systems, the complete text of the GNU Lesser General Public
|
||||
License can be found in the file /usr/share/common-licenses/LGPL.
|
||||
|
1
tests/visual_tests/fonts/KhmerOS/readme.md
Normal file
|
@ -0,0 +1 @@
|
|||
KhmerOS.ttf V.5.0 downloaded from http://www.khmeros.info/en/fonts on Dec 2, 2013.
|
BIN
tests/visual_tests/fonts/Rachana/RachanaMac.ttf
Normal file
1
tests/visual_tests/fonts/Rachana/readme.md
Normal file
|
@ -0,0 +1 @@
|
|||
RachanaMac.ttf V.5.0 downloaded from https://sites.google.com/site/macmalayalam/ on Dec 2, 2013.
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<fontconfig>
|
||||
<match>
|
||||
<test name="lang" compare="contains">
|
||||
<string>bn</string>
|
||||
</test>
|
||||
<test name="family">
|
||||
<string>sans-serif</string>
|
||||
</test>
|
||||
<edit name="family" mode="prepend">
|
||||
<string>Lohit Bengali</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<match target="font">
|
||||
<test name="family" compare="eq">
|
||||
<string>Lohit Bengali</string>
|
||||
</test>
|
||||
<edit name="autohint" mode="assign">
|
||||
<bool>true</bool>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<alias>
|
||||
<family>Lohit Bengali</family>
|
||||
<default>
|
||||
<family>sans-serif</family>
|
||||
</default>
|
||||
</alias>
|
||||
</fontconfig>
|
||||
|
12
tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/AUTHORS
Normal file
|
@ -0,0 +1,12 @@
|
|||
Contributors (Alphabetically) :-
|
||||
- Baishampayan Ghose
|
||||
- Bernard Massot
|
||||
- Darshan Santani
|
||||
- Hiran Venugopalan
|
||||
- Leon Ho
|
||||
- Parag Nemade
|
||||
- Pravin Satpute
|
||||
- Rahul Bhalerao
|
||||
- Ramkrishna Reddy
|
||||
- Sandeep Shedmake
|
||||
- Shriramana Sharma
|
|
@ -0,0 +1,7 @@
|
|||
Copyright 2011-12 Lohit Fonts Project contributors.
|
||||
<http://fedorahosted.org/lohit>
|
||||
|
||||
Licensed under the SIL Open Font License 1.1 (see file
|
||||
OFL.txt)
|
||||
|
||||
Lohit is a trademark of Red Hat, Inc.
|
25
tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/ChangeLog
Normal file
|
@ -0,0 +1,25 @@
|
|||
lohit-bengali
|
||||
Current Version :- 2.5.3
|
||||
|
||||
* Fri Dec 21 2012 Pravin Satpute <psatpute@redhat.com> - 2.5.3
|
||||
- Dropping RFN from OFL.txt
|
||||
|
||||
* Thu Nov 08 2012 Pravin Satpute <psatpute@redhat.com> - 2.5.2
|
||||
- resolved rendering error for UTRRS Assamese GPSO sequence 25, 28 44 and 63 for Harfbuzz
|
||||
- resolved rendering error for UTRRS Bengali GSUB sequnce 86, 88 for harfbuzz
|
||||
- corrected panose values #803294
|
||||
|
||||
* Wed Feb 29 2012 Pravin Satpute <psatpute@redhat.com> - 2.5.1
|
||||
- added U+09FB character
|
||||
- added autohint instruction in conf file
|
||||
|
||||
* Wed Sep 21 2011 Pravin Satpute <psatpute@redhat.com> - 2.5.0
|
||||
- relicensing to OFL 1.1
|
||||
|
||||
* Tue Aug 30 2011 Pravin Satpute <psatpute@redhat.com> - 2.4.3.1
|
||||
- minor release, added makefile in tarball
|
||||
|
||||
* Fri Aug 28 2009 Pravin Satpute <psatpute@redhat.com> - 2.4.3
|
||||
- first release with split tarball
|
||||
- see Changelog.old for previous changes
|
||||
|
175
tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/ChangeLog.old
Normal file
|
@ -0,0 +1,175 @@
|
|||
fonts-indic
|
||||
Current Version :- 2.4.3
|
||||
* Wed Sep 09 2009 Pravin Satpute <psatpute@redhat.com> - 2.4.3
|
||||
- updated conf file for all language
|
||||
- added changelog for individual lang
|
||||
- modified makedist.sh generate.sh for releasing new tarballs
|
||||
|
||||
* Fri Aug 28 2009 Pravin Satpute <psatpute@redhat.com> - 2.4.2
|
||||
- added conf file for all fonts
|
||||
- contributions from Parag Nemade <pnemade@redhat.com> for conf files
|
||||
|
||||
* Wed Aug 12 2009 Pravin Satpute <psatpute@redhat.com> - 2.4.1
|
||||
- Update Copyright
|
||||
|
||||
* Tue Aug 04 2009 Pravin Satpute <psatpute@redhat.com> - 2.4.0
|
||||
- Added Unicode 5.1 support in All Lohit fonts
|
||||
|
||||
* Thu Mar 05 2009 Rahul Bhalerao <rbhalera@redhat.com> - 2.3.8
|
||||
- Bug 428427 - [kn_IN][fonts-indic] - 0CB5+0CCA is wrongly rendering
|
||||
- Bug 450699 - [ta_IN]Errors in "sh" and "shrI" in Lohit Tamil font (fixed in font, needs rendering update)
|
||||
- Bug 476427 - [te_IN] - Consonant+Virama+Consonant+Virama+space renders the second virama as a separate glyph in lohit-telugu font
|
||||
- Bug 479100 - [kn_IN] Conjunct combination of U0C9D with U0CCA/U0CCB is rendering wrongly
|
||||
- Bug 483530 - [bn_IN]Lohit Bengali font cheating about character support
|
||||
- Added Lohit-Assamese
|
||||
- Modified README file.
|
||||
|
||||
* Tue Sep 09 2008 Rahul Bhalerao <rbhalera@redhat.com> - 2.3.1
|
||||
- Bug 216400: [te_IN] - Anaconda GUI - Release Notes button is overlapping
|
||||
with other texts in a specific page
|
||||
|
||||
* Wed Aug 20 2008 Rahul Bhalerao <rbhalera@redhat.com> - 2.3.0
|
||||
- Bug 215902: [hi_IN, mr_IN]Incorrect extent of 0x093f when attached to a composite character which has width greater than a single character (hi_IN & maybe others)
|
||||
- Forked Lohit Hindi into Marathi, Maithili, Kashmiri, Konkani, Sindhi and Nepali.
|
||||
|
||||
* Fri Jun 06 2008 Rahul Bhalerao <rbhalera@redhat.com>
|
||||
- Bug 445176: [ml_IN] Conjuncts combining with 0D30 do not form the pre based glyph
|
||||
|
||||
* Fri Jun 06 2008 Rahul Bhalerao <rbhalera@redhat.com>
|
||||
- Improved Anchoring(blwm Anchor-0) for Hindi font.
|
||||
- Corrected positioning of U+0953 for Hindi font.
|
||||
|
||||
* Tue Apr 29 2008 Rahul Bhalerao <rbhalera@redhat.com> - 2.2.1
|
||||
- Resolved bugs (bugzilla.redhat.com):
|
||||
- Bug 444559 Processed: [ml_IN] Wrong shape for conjuncts formed using 0D30
|
||||
(xRa) in a word
|
||||
- Bug 444561 Processed: [ml_IN] Conjuncts does not get combined with 0D30 to
|
||||
form the pre based glyph
|
||||
- Bug 444563: [ml_IN] When 0D2F is combined with a consonant and followed by
|
||||
0D15, 0D2F joins with 0D15
|
||||
|
||||
* Tue Apr 08 2008 Rahul Bhalerao <rbhalera@redhat.com> - 2.2.0
|
||||
- Resolved bugs (bugzilla.redhat.com):
|
||||
- Bug 202400: [hi_IN] New codepoints/glyphs in Unicode 5.0
|
||||
- Bug 205981: [hi_IN]The font file of Devanagari(lohit_hi.ttf) lacks the glyph
|
||||
of U+0x0904
|
||||
- Bug 206426: [hi_IN, mr_IN] Some Glyphs are missing and some GPOS shapes
|
||||
should be more perfect - Priority - C
|
||||
- Bug 239630: [hi_IN] the glyph of 0x0953 in lohit_hi.ttf is wrong.
|
||||
- Bug 428427: [kn_IN][fonts-indic] - 0CB5+0CCA is wrongly rendering
|
||||
|
||||
* Thu Feb 28 2008 Rahul Bhalerao <rbhalera@redhat.com> - 2.1.9
|
||||
- Resolved bugs(bugzilla.redhat.com):
|
||||
- Bug 431035: [ml_IN] Glyph to be formed for nine consonants + 0D4D + 0D32
|
||||
- Bug 433437: [ml_IN] Rendering combination incorrect with 0D35
|
||||
- Bug 433440: [ml_IN] Rendering combination incorrect with 0D2F
|
||||
- Contributions from Hiran Venugopalan (xRa glyphs and few other)
|
||||
|
||||
* Fri Jan 25 2008 Rahul Bhalerao <rbhalera@redhat.com> - 2.1.8
|
||||
- Bug 192812: [ml_IN]GPOS issues in new Malayalam font
|
||||
- Bug 402321: [ml_IN} Wrong combinations used for the conjunct 'ന്പ'
|
||||
- Bug 402331: [ml_IN] Wrong combinations used for conjunct 'ന്റ'
|
||||
- Bug 424701: [ml_IN] words are shown joined (very low space shown on screen)
|
||||
- Bug 429526: [ml_IN]: Removal of a glyph from font file
|
||||
- Bug 247233: Additional special character rendering for assamese [as-IN] and bengali [bn-IN]
|
||||
|
||||
* Tue Jan 15 2008 Rahul Bhalerao <rbhalera@redhat.com> - 2.1.7
|
||||
- Updated the makedist.sh script
|
||||
|
||||
* Tue Jan 15 2008 Rahul Bhalerao <rbhalera@redhat.com> - 2.1.7
|
||||
- Bug 233419: [kn_IN] GSUB's combinaing with additional dependent vowel are
|
||||
not rendering correctly
|
||||
|
||||
* Fri Dec 14 2007 Rahul Bhalerao <rbhalera@redhat.com> - 2.1.6
|
||||
- Bug 234284: [pa_IN] Enlarge size for asterik(*)
|
||||
|
||||
* Mon Mar 26 2007 Parag Nemade <pnemade@redhat.com> - 2.1.5
|
||||
- Resolved Bugs from Parag Nemade
|
||||
- Bug 231965: [kn_IN] wrong Conjuct combines during the formation kannada letter [yo]
|
||||
- Bug 233257: [kn_IN] Conjuct combination of U0CAE with U0CCB is rendering wrongly
|
||||
- Bug 233415: [kn_IN] GSUB's combinaing with additional dependent vowel are not rendering correctly
|
||||
- Bug 233554: [kn_IN] GSUB's combinaing with additional dependent vowel U0CC0 are not rendering correctly
|
||||
- Bug 233555: [kn_IN] GSUB's combinaing with additional dependent vowel U0CC7 are not rendering correctly
|
||||
- Bug 233556: [kn_IN] GSUB's combinaing with additional dependent vowel U0CC6 are not rendering correctly
|
||||
- Bug 233557: [kn_IN] GSUB's combinaing with additional dependent vowel U0CC8 are not rendering correctly
|
||||
- Bug 233558: [kn_IN] GSUB's combinaing with additional dependent vowel U0CCBare not rendering correctly
|
||||
- Bug 233559: [kn_IN] GSUB's combinaing with additional dependent vowel U0CBE are not rendering correctly
|
||||
- Bug 233560: [kn_IN] GSUB's combinaing with additional dependent vowel U0CBF are not rendering correctly
|
||||
|
||||
* Mon Mar 05 2007 Parag Nemade <pnemade@redhat.com> - 2.1.4
|
||||
- Resolved Bugs from Parag Nemade
|
||||
- Bug 221383: [kn_IN] GSUB combinations has problem with Ra
|
||||
|
||||
* Mon Feb 19 2007 Parag Nemade <pnemade@redhat.com> - 2.1.3
|
||||
- Resolved Bugs from Parag Nemade
|
||||
- Bug 202401: [ta_IN] New codepoints/glyphs in Unicode 5.0
|
||||
- Bug 223774: [kn_IN] Some Ligature rules are wrong in the font file
|
||||
- Bug 223971: [kn_IN] Consonant + Halant + Consonant + Dependent Vowel not appearing properly in some rare cases
|
||||
- Bug 227971: [kn_IN] Combinations with 2 Halants not rendering properly
|
||||
|
||||
* Tue Jan 16 2007 Parag Nemade <pnemade@redhat.com> - 2.1.2
|
||||
- Resolved Bugs from Parag Nemade
|
||||
- Bug 222407: [or_IN] [fonts-indic] - One GSUB Conjunct is not appearing with its correct shape
|
||||
- Bug 206434: [ml_IN] Digits are appearing in English instead of malayalam - Priority C
|
||||
- Bug 215894: Relative height of 0x0901 (and 0x0902) on 0x0915 is different than other devnagari characters (hi_IN, mr_IN)
|
||||
- Bug 222408: [te_IN] [fonts-indic] - Danda and Double Danda to be implemented with 0964 && 0965
|
||||
- Bug 222409: [kn_IN] [fonts-indic] - Danda and Double Danda to be implemented with 0964 && 0965
|
||||
- Bug 221384: [kn_IN] - shape of ra (U+0CB0) is not corret in combined character (below base)
|
||||
|
||||
* Tue Jan 16 2007 Parag Nemade <pnemade@redhat.com> - 2.1.1
|
||||
- Added makedist.sh, generate.sh and generate.pe script files.
|
||||
|
||||
* Fri Jan 12 2007 Parag Nemade <pnemade@redhat.com> - 2.0.13
|
||||
- Resolved Bugs from Parag Nemade
|
||||
- Bug 220880: [or_IN] Danda need to move from 0B64/0B65 to 0964/0965
|
||||
- Bug 222406: [ml_IN] Danda need to move from 0D64/0D65 to 0964/0965
|
||||
|
||||
* Wed Jan 02 2007 Parag Nemade <pnemade@redhat.com> - 2.0.12
|
||||
- Resolved Bugs from Parag Nemade
|
||||
- Bug 220881: [ta_IN] [fonts-tamil] - Warning showing in the terminal when run apps with ta_IN locale
|
||||
- Bug 220882: [hi_IN] rendering problem for number "5" in postscript file
|
||||
|
||||
* Wed Dec 13 2006 Parag Nemade <pnemade@redhat.com> - 2.0.11
|
||||
- Resolved Bugs from Parag Nemade
|
||||
- Bug 216639: [kn_IN] OTF rules to be fixed - Priority A
|
||||
- Bug 217482: [kn_IN] - pango - Composed Char not rendered properly
|
||||
- Bug 219583: [pa_IN] Punjabi fonts' size is big as compared to English
|
||||
- Bug 218588: [gu_IN] Qt doesn't display virama properly
|
||||
|
||||
* Tue Dec 06 2006 Parag Nemade <pnemade@redhat.com> - 2.0.10
|
||||
- Resolved Bugs from Parag Nemade
|
||||
- Bug 207269: [ta_IN] - Some conjunct characters not appearing with proper shape - Priority - B
|
||||
- Bug 217482: [kn_IN] - pango - Composed Char not rendered properly
|
||||
- Bug 216628: [ml] characters are not shown bold during selecting BOLD font
|
||||
- Bug 218588: [gu_IN] Qt doesn't display virama properly
|
||||
- Bug 206599: [te_IN] - Some of the Priority - C GSUB Conjuncts are not appearing with its actual shape
|
||||
- Resolved Bugs from LingNing Zhang
|
||||
- Bug 218586: [ml_IN] 0d2f+0d4d combination is invaild when put in word
|
||||
- Bug 218587: [ml_IN] 0d35+0d4d combination is invaild (should not combine)
|
||||
|
||||
* Tue Nov 21 2006 Parag Nemade <pnemade@redhat.com> - 2.0.9
|
||||
- Fixed Bugs from Parag Nemade
|
||||
- Bug 216060: [pa_IN]Lohit Punjabi: (U+0A03) Gurmukhi Sign Visarga right margin is too wide.
|
||||
|
||||
* Tue Nov 21 2006 Parag Nemade <pnemade@redhat.com> - 2.0.8
|
||||
- Fixed Bugs from Parag Nemade
|
||||
- Bug 216629 : [te_IN] GPOS position should be at middle instead of left hand side - Priority B
|
||||
- Bug 216631 : [or_IN] one GSUB Rule is wrongly defined - Priority A
|
||||
- Bug 216628 : [ml] characters are not shown bold during selecting BOLD font
|
||||
- Bug 216624 : [pa_IN] 0a01/0a03/0964/0965 is missing from font
|
||||
- Bug 216634 : Glyphs for two combinations are wrong in Gujarati (gu_IN)
|
||||
- Bug 197216 : [bn_IN]Incorrect glyph for conjunct
|
||||
- Bug 215894 : Relative height of 0x0901 (and 0x0902) on 0x0915 is different than
|
||||
other devnagari characters (hi_IN, mr_IN)
|
||||
- Fixed Bugs from LingNing Zhang
|
||||
- Bug 216626 : [as_IN] Pango - A particular char when Conjuncts, creates Cursor Nevigation Problem
|
||||
- Bug 216627 : [ml_IN] The glyph of 0x25CC is not existing in lohit_ml.ttf
|
||||
- Bug 216639 : [kn_IN] OTF rules to be fixed - Priority A
|
||||
|
||||
* Tue 17 oct 2006 Leon Ho <llch@redhat.com> - 2.0.7
|
||||
- Bug 206601: [ta_IN] Glyph is missing for Unicode U+0BB6 - Priority - A (Rahul Bhalerao)
|
||||
- Bug 216639: [kn_IN] OTF rules to be fixed - Priority A (Ramakrishna Reddy)
|
||||
|
||||
* Fri 29 Sep 2006 Leon Ho <llch@redhat.com> - 2.0.6
|
||||
- Bug 208525: [ml_IN]the glyph of 0d33+0d4d+0d33 is wrong (LingNing Zhang)
|
||||
- Bug 208540: [ml_IN]the glyph of 0d2f+0d4d and the glyph of 0d2f+0d4d+0d2f are wrong (LingNing Zhang)
|
94
tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/OFL.txt
Normal file
|
@ -0,0 +1,94 @@
|
|||
Copyright 2011-12 Lohit Fonts Project contributors
|
||||
<http://fedorahosted.org/lohit>
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
21
tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/README
Normal file
|
@ -0,0 +1,21 @@
|
|||
Lohit Fonts Project
|
||||
|
||||
1) Generating .ttf file from source
|
||||
Example
|
||||
$tar -xvf lohit-hindi-2.4.3.tar.gz
|
||||
$cd lohit-hindi-2.4.3
|
||||
$make
|
||||
|
||||
2) Installing font (.ttf) file
|
||||
You can then install .ttf font files by copying them to ~/.fonts directory.
|
||||
Then execute fc-cache command and then relogin to use that font.
|
||||
|
||||
|
||||
Lohit Project Information :-
|
||||
See https://fedorahosted.org/lohit/ for more details.
|
||||
|
||||
Mailing list:-
|
||||
http://www.redhat.com/mailman/listinfo/lohit-devel-list
|
||||
|
||||
|
||||
|
20
tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/README.cvs
Normal file
|
@ -0,0 +1,20 @@
|
|||
Lohit Fonts Project
|
||||
|
||||
Scripts Usage:-
|
||||
Lohit CVS is now included with 2 shell scripts
|
||||
1)generate.sh
|
||||
Once you checkout the .sfd files from lohit CVS, you just need to execute this script
|
||||
and you will get all .ttf files in respective language directory. You can then install those font files
|
||||
by copying them to ~/.fonts directory. Then execute fc-cache command and then relogin to use that font.
|
||||
|
||||
2)makedist.sh
|
||||
Use this script to generate upstream tarball used by fonts-indic SPEC to build rpms.
|
||||
e.g.
|
||||
To generate lohit-lang-$version.tar.gz follow steps as
|
||||
1) Anonymous CVS access
|
||||
$ svn co http://svn.fedorahosted.org/svn/lohit
|
||||
1) cd lohit
|
||||
2) sh makedist.sh
|
||||
You will get upstream tarball used to build lohit-fonts-$version-1 rpm.
|
||||
NOTE:- This script can be used only from 2.1.1 and above version of this package.
|
||||
|
Before Width: | Height: | Size: 587 B After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 568 B After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 593 B After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 619 B After Width: | Height: | Size: 6 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 568 B After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 568 B After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 572 B After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 619 B After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2 KiB |
After Width: | Height: | Size: 2 KiB |
|
@ -6,6 +6,7 @@
|
|||
<Datasource>
|
||||
<Parameter name="type">csv</Parameter>
|
||||
<Parameter name="file">../data/points.csv</Parameter>
|
||||
<Parameter name="extent">-1,-1,1,1</Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
|
||||
|
@ -16,23 +17,23 @@
|
|||
</Rule>
|
||||
<Rule>
|
||||
<!-- This is an easy test to ensure text shaping actually works. Ligatures are rendered when harfbuzz is used, but not with the old text rendering system. -->
|
||||
<Filter>[nr] = "3"</Filter>
|
||||
<Filter>[nr] = 3</Filter>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" dy="-16">"Ligature: fi"</TextSymbolizer>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" dy="16">"mixed نامجو Text"</TextSymbolizer>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<!-- In addition to the problem mentioned in the bug report (which seems to be gone) this the position is calculated incorrectly -->
|
||||
<Filter>[nr] = "1"</Filter>
|
||||
<Filter>[nr] = 1</Filter>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" dy="-16">"نامجو 17"</TextSymbolizer>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="10" placement="point" dy="16">"#519"</TextSymbolizer>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[nr] = "6"</Filter>
|
||||
<Filter>[nr] = 6</Filter>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="36" placement="point" dy="-16">"زنقة الملاح"</TextSymbolizer>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="10" placement="point" dy="16">"#1154"</TextSymbolizer>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[nr] = "9"</Filter>
|
||||
<Filter>[nr] = 9</Filter>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="36" placement="point" dy="-16">"أڭادير"</TextSymbolizer>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="10" placement="point" dy="16">"#1146"</TextSymbolizer>
|
||||
</Rule>
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE Map>
|
||||
<Map background-color="white" srs="+proj=latlong +datum=WGS84" font-directory="../fonts">
|
||||
<Map background-color="white" srs="+proj=latlong +datum=WGS84"
|
||||
font-directory="../fonts/KhmerOS/">
|
||||
|
||||
<Layer name="layer" srs="+proj=latlong +datum=WGS84">
|
||||
<StyleName>My Style</StyleName>
|
||||
<Datasource>
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE Map>
|
||||
<Map background-color="white" srs="+proj=latlong +datum=WGS84">
|
||||
<Map background-color="white" srs="+proj=latlong +datum=WGS84"
|
||||
font-directory="../fonts/KhmerOS/">
|
||||
|
||||
<Layer name="layer" srs="+proj=latlong +datum=WGS84">
|
||||
<StyleName>My Style</StyleName>
|
||||
<Datasource>
|
||||
|
@ -13,23 +15,23 @@
|
|||
<PointSymbolizer/>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[nr] = "1"</Filter>
|
||||
<Filter>[nr] = 1</Filter>
|
||||
<TextSymbolizer face-name="Khmer OS Regular" size="20" placement="point" dy="16">"ព្រះរាជាណាចក្រកម្ពុជា"</TextSymbolizer>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[nr] = "3"</Filter>
|
||||
<Filter>[nr] = 3</Filter>
|
||||
<TextSymbolizer face-name="Khmer OS Regular" size="20" placement="point" dy="16">"ស្ត្រី"</TextSymbolizer>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[nr] = "5"</Filter>
|
||||
<Filter>[nr] = 5</Filter>
|
||||
<TextSymbolizer face-name="Khmer OS Regular" size="20" placement="point" dy="16">"ផ្លូវ ១២៣"</TextSymbolizer>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[nr] = "7"</Filter>
|
||||
<Filter>[nr] = 7</Filter>
|
||||
<TextSymbolizer face-name="Khmer OS Regular" size="20" placement="point" dy="-16">"ផផ្ទះសំណាក់សណ្ឋាគារមាស"</TextSymbolizer>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[nr] = "9"</Filter>
|
||||
<Filter>[nr] = 9</Filter>
|
||||
<TextSymbolizer face-name="Khmer OS Regular" size="20" placement="point" dy="16">"ផ្លូវ១២៣"</TextSymbolizer>
|
||||
</Rule>
|
||||
</Style>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE Map>
|
||||
<!-- complex script on line test -->
|
||||
<Map background-color="white" srs="+proj=latlong +datum=WGS84" font-directory="../fonts">
|
||||
<Map background-color="white" srs="+proj=latlong +datum=WGS84"
|
||||
font-directory="../fonts/KhmerOS/">
|
||||
|
||||
<Layer name="layer" srs="+proj=latlong +datum=WGS84">
|
||||
<StyleName>lines</StyleName>
|
||||
|
|
|
@ -1,24 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE Map>
|
||||
<Map background-color="white" srs="+proj=latlong +datum=WGS84" font-directory="/usr/share/fonts/truetype/lohit-bengali/">
|
||||
<!--
|
||||
Lohit bengali from https://fedorahosted.org/releases/l/o/lohit/lohit-bengali-ttf-2.5.3.tar.gz
|
||||
via https://fedorahosted.org/lohit/
|
||||
-->
|
||||
<Map background-color="white" srs="+proj=latlong +datum=WGS84"
|
||||
font-directory="../fonts/lohit-bengali-ttf-2.5.3/">
|
||||
|
||||
<Layer name="layer" srs="+proj=latlong +datum=WGS84">
|
||||
<StyleName>My Style</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="type">csv</Parameter>
|
||||
<Parameter name="file">../data/points.csv</Parameter>
|
||||
<Parameter name="type">csv</Parameter>
|
||||
<Parameter name="file">../data/points.csv</Parameter>
|
||||
<Parameter name="extent">-1,-1,1,1</Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
<Style name="My Style">
|
||||
<Rule>
|
||||
<Filter>[nr] = "3"</Filter>
|
||||
<Filter>[nr] = 3</Filter>
|
||||
<TextSymbolizer face-name="Lohit Bengali Regular" size="30" placement="point" dy="0">"গোপালগঞ্জ"</TextSymbolizer>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[nr] = "5"</Filter>
|
||||
<Filter>[nr] = 5</Filter>
|
||||
<TextSymbolizer face-name="Lohit Bengali Regular" size="30" placement="point" dy="0">"ঝিনাইদহ"</TextSymbolizer>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[nr] = "7"</Filter>
|
||||
<Filter>[nr] = 7</Filter>
|
||||
<TextSymbolizer face-name="Lohit Bengali Regular" size="30" placement="point" dy="0">"কুষ্টিয়া"</TextSymbolizer>
|
||||
</Rule>
|
||||
</Style>
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE Map>
|
||||
<Map background-color="white" srs="+proj=latlong +datum=WGS84" font-directory="/usr/share/fonts/truetype/malayalam-fonts/">
|
||||
<Map background-color="white" srs="+proj=latlong +datum=WGS84"
|
||||
font-directory="../fonts/Rachana/">
|
||||
|
||||
<Layer name="layer" srs="+proj=latlong +datum=WGS84">
|
||||
<StyleName>My Style</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="type">csv</Parameter>
|
||||
<Parameter name="file">../data/points.csv</Parameter>
|
||||
<Parameter name="type">csv</Parameter>
|
||||
<Parameter name="file">../data/points.csv</Parameter>
|
||||
<Parameter name="extent">-1,-1,1,1</Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
<Style name="My Style">
|
||||
<Rule>
|
||||
<Filter>[nr] = "5"</Filter>
|
||||
<TextSymbolizer face-name="Rachana Regular" size="30" placement="point" dy="0">"ഇന്ത്യ"</TextSymbolizer>
|
||||
<Filter>[nr] = 5</Filter>
|
||||
<TextSymbolizer face-name="Rachana Book" size="30" placement="point" dy="0">"ഇന്ത്യ"</TextSymbolizer>
|
||||
</Rule>
|
||||
</Style>
|
||||
</Map>
|
||||
|
|
|
@ -153,9 +153,8 @@ files = {
|
|||
'text-bug2037': {'sizes': [(800, 300)], 'bbox': default_text_box},
|
||||
'text-expressionformat-color': {'sizes': [(800, 100)], 'bbox': default_text_box},
|
||||
'text-halign': {'sizes': [(800,800)], 'bbox': default_text_box},
|
||||
# Disabled by default as the required font isn't shipped with mapnik
|
||||
#'text-malayalam': {'sizes': [(800, 100)], 'bbox': default_text_box},
|
||||
#'text-bengali': {'sizes': [(800, 100)], 'bbox': default_text_box},
|
||||
'text-malayalam': {'sizes': [(800, 100)], 'bbox': default_text_box},
|
||||
'text-bengali': {'sizes': [(800, 100)], 'bbox': default_text_box},
|
||||
'line-pattern-symbolizer': {'sizes':[(900, 250)],'bbox': mapnik.Box2d(-5.192, 50.189, -5.174, 50.195)},
|
||||
'tiff-alpha-gdal': {'sizes':[(600,400)]},
|
||||
'tiff-alpha-broken-assoc-alpha-gdal': {'sizes':[(600,400)]},
|
||||
|
@ -335,7 +334,7 @@ def render(filename,config, width, height, bbox, scale_factor, reporting):
|
|||
postfix = "%s-%d-%d-%s" % (filename, width, height, scale_factor)
|
||||
|
||||
try:
|
||||
mapnik.load_map(m, os.path.join(dirname, "styles", "%s.xml" % filename), False)
|
||||
mapnik.load_map(m, os.path.join(dirname, "styles", "%s.xml" % filename), True)
|
||||
if bbox is not None:
|
||||
m.zoom_to_box(bbox)
|
||||
else:
|
||||
|
|