diff --git a/deps/agg/src/agg_pixfmt_rgba.cpp b/deps/agg/src/agg_pixfmt_rgba.cpp index 4541e441b..dff0bdb90 100644 --- a/deps/agg/src/agg_pixfmt_rgba.cpp +++ b/deps/agg/src/agg_pixfmt_rgba.cpp @@ -1,6 +1,7 @@ #include "agg_pixfmt_rgba.h" #include #include +#include //#include namespace agg @@ -88,15 +89,16 @@ void comp_op_rgba_color::blend_pix(value_type* p, { using namespace boost; using namespace gil; - using namespace hsv_color_space; + using namespace hsl_color_space; rgb8_pixel_t rgb_src(sr,sg,sb); rgb8_pixel_t rgb_dst(p[Order::R],p[Order::G],p[Order::B]); - hsv32f_pixel_t hsv_src,hsv_dst; - color_convert( rgb_src, hsv_src); - color_convert( rgb_dst, hsv_dst); - get_color(hsv_dst,hue_t()) = get_color(hsv_src,hue_t()); - get_color(hsv_dst,saturation_t()) = get_color(hsv_src,saturation_t()); - color_convert(hsv_dst, rgb_dst); + hsl32f_pixel_t hsl_src,hsl_dst; + color_convert( rgb_src, hsl_src); + color_convert( rgb_dst, hsl_dst); + get_color(hsl_dst,hue_t()) = get_color(hsl_src,hue_t()); + get_color(hsl_dst,saturation_t()) = get_color(hsl_src,saturation_t()); + get_color(hsl_dst,lightness_t()) = get_color(hsl_dst,lightness_t()); + color_convert(hsl_dst, rgb_dst); p[Order::R] = get_color(rgb_dst,red_t()); p[Order::G] = get_color(rgb_dst,green_t()); p[Order::B] = get_color(rgb_dst,blue_t()); diff --git a/plugins/input/ogr/ogr_datasource.cpp b/plugins/input/ogr/ogr_datasource.cpp index 9ad62913f..80d3094ab 100644 --- a/plugins/input/ogr/ogr_datasource.cpp +++ b/plugins/input/ogr/ogr_datasource.cpp @@ -120,7 +120,7 @@ void ogr_datasource::init(mapnik::parameters const& params) #if GDAL_VERSION_MAJOR >= 2 unsigned int nOpenFlags = GDAL_OF_READONLY | GDAL_OF_VECTOR; const char* papszAllowedDrivers[] = { driver.c_str(), NULL }; - dataset_ = static_cast(GDALOpenEx(dataset_name_.c_str(),nOpenFlags,papszAllowedDrivers,NULL,NULL)); + dataset_ = reinterpret_cast(GDALOpenEx(dataset_name_.c_str(),nOpenFlags,papszAllowedDrivers,NULL,NULL)); #else OGRSFDriver * ogr_driver = OGRSFDriverRegistrar::GetRegistrar()->GetDriverByName(driver.c_str()); if (ogr_driver && ogr_driver != NULL) @@ -133,7 +133,7 @@ void ogr_datasource::init(mapnik::parameters const& params) { // open ogr driver #if GDAL_VERSION_MAJOR >= 2 - dataset_ = static_cast(OGROpen(dataset_name_.c_str(), FALSE, NULL)); + dataset_ = reinterpret_cast(OGROpen(dataset_name_.c_str(), FALSE, NULL)); #else dataset_ = OGRSFDriverRegistrar::Open(dataset_name_.c_str(), FALSE); #endif diff --git a/src/font_engine_freetype.cpp b/src/font_engine_freetype.cpp index 9f0bdcd44..ecad4bbe5 100644 --- a/src/font_engine_freetype.cpp +++ b/src/font_engine_freetype.cpp @@ -90,16 +90,14 @@ bool freetype_engine::is_font_file(std::string const& file_name) } unsigned long ft_read_cb(FT_Stream stream, unsigned long offset, unsigned char *buffer, unsigned long count) { - if (count <= 0) return count; - std::ifstream * file = static_cast(stream->descriptor.pointer); - file->seekg(offset, std::ios::beg); - file->read((char*)buffer, count); - return file->gcount(); + if (count <= 0) return 0; + FILE * file = static_cast(stream->descriptor.pointer); + std::fseek (file , offset , SEEK_SET); + return std::fread ((char*)buffer, 1, count, file); } void ft_close_cb(FT_Stream stream) { - std::ifstream * file = static_cast(stream->descriptor.pointer); - file->close(); + std::fclose (static_cast(stream->descriptor.pointer)); } bool freetype_engine::register_font(std::string const& file_name) @@ -109,13 +107,11 @@ bool freetype_engine::register_font(std::string const& file_name) #endif #ifdef _WINDOWS - std::ifstream file(mapnik::utf8_to_utf16(file_name) , std::ios::binary); + FILE * file = _wfopen(mapnik::utf8_to_utf16(file_name).c_str(), L"rb"); #else - std::ifstream file(file_name.c_str() , std::ios::binary); + FILE * file = std::fopen(file_name.c_str(),"rb"); #endif - if (!file.good()) { - return false; - } + if (file == NULL) return false; FT_Library library = 0; FT_Error error = FT_Init_FreeType(&library); @@ -129,16 +125,13 @@ bool freetype_engine::register_font(std::string const& file_name) FT_StreamRec streamRec; memset(&args, 0, sizeof(args)); memset(&streamRec, 0, sizeof(streamRec)); - std::streampos beg = file.tellg(); - file.seekg (0, std::ios::end); - std::streampos end = file.tellg(); - std::size_t file_size = end - beg; - file.seekg (0, std::ios::beg); - + fseek(file, 0, SEEK_END); + std::size_t file_size = std::ftell(file); + fseek(file, 0, SEEK_SET); streamRec.base = 0; streamRec.pos = 0; streamRec.size = file_size; - streamRec.descriptor.pointer = &file; + streamRec.descriptor.pointer = file; streamRec.read = ft_read_cb; streamRec.close = ft_close_cb; args.flags = FT_OPEN_STREAM; @@ -183,9 +176,8 @@ bool freetype_engine::register_font(std::string const& file_name) MAPNIK_LOG_ERROR(font_engine_freetype) << "register_font: " << s.str(); } + if (face) FT_Done_Face(face); } - if (face) - FT_Done_Face(face); if (library) FT_Done_FreeType(library); return success; @@ -300,22 +292,33 @@ face_ptr freetype_engine::create_face(std::string const& family_name) #ifdef MAPNIK_THREADSAFE mutex::scoped_lock lock(mutex_); #endif - std::ifstream is(itr->second.second.c_str() , std::ios::binary); - std::string buffer((std::istreambuf_iterator(is)), - std::istreambuf_iterator()); - std::pair::iterator,bool> result - = memory_fonts_.insert(std::make_pair(itr->second.second, buffer)); - - FT_Error error = FT_New_Memory_Face (library_, - reinterpret_cast(result.first->second.c_str()), - static_cast(buffer.size()), - itr->second.first, - &face); - if (!error) return boost::make_shared(face); - else +#ifdef _WINDOWS + FILE * file = _wfopen(mapnik::utf8_to_utf16(itr->second.second).c_str(), L"rb"); +#else + FILE * file = std::fopen(itr->second.second.c_str(),"rb"); +#endif + if (file != NULL) { - // we can't load font, erase it. - memory_fonts_.erase(result.first); + std::fseek(file, 0, SEEK_END); + std::size_t file_size = std::ftell(file); + std::fseek(file, 0, SEEK_SET); + std::string buffer; + buffer.resize(file_size); + std::fread(&buffer[0], file_size, 1, file); + std::pair::iterator,bool> result = + memory_fonts_.insert(std::make_pair(itr->second.second, buffer)); + FT_Error error = FT_New_Memory_Face (library_, + reinterpret_cast(result.first->second.c_str()), + static_cast(buffer.size()), + itr->second.first, + &face); + std::fclose(file); + if (!error) return boost::make_shared(face); + else + { + // we can't load font, erase it. + memory_fonts_.erase(result.first); + } } } } diff --git a/tests/python_tests/save_map_test.py b/tests/python_tests/save_map_test.py index 8aac45ba4..0698c3a3d 100644 --- a/tests/python_tests/save_map_test.py +++ b/tests/python_tests/save_map_test.py @@ -23,7 +23,7 @@ def compare_map(xml): m = mapnik.Map(256, 256) absolute_base = os.path.abspath(os.path.dirname(xml)) try: - mapnik.load_map(m, xml, False, absolute_base) + mapnik.load_map(m, xml, True, absolute_base) except RuntimeError, e: # only test datasources that we have installed if not 'Could not create datasource' in str(e): @@ -37,7 +37,7 @@ def compare_map(xml): os.remove(test_map) mapnik.save_map(m, test_map) new_map = mapnik.Map(256, 256) - mapnik.load_map(new_map, test_map,False,absolute_base) + mapnik.load_map(new_map, test_map, True, absolute_base) open(test_map2,'w').write(mapnik.save_map_to_string(new_map)) diff = ' diff %s %s' % (os.path.abspath(test_map),os.path.abspath(test_map2)) try: diff --git a/tests/visual_tests/fonts/Rachana/RachanaMac.ttf b/tests/visual_tests/fonts/Rachana/RachanaMac.ttf new file mode 100644 index 000000000..a25c6d597 Binary files /dev/null and b/tests/visual_tests/fonts/Rachana/RachanaMac.ttf differ diff --git a/tests/visual_tests/fonts/Rachana/readme.md b/tests/visual_tests/fonts/Rachana/readme.md new file mode 100644 index 000000000..133046d4f --- /dev/null +++ b/tests/visual_tests/fonts/Rachana/readme.md @@ -0,0 +1 @@ +RachanaMac.ttf V.5.0 downloaded from https://sites.google.com/site/macmalayalam/ on Dec 2, 2013. diff --git a/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/66-lohit-bengali.conf b/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/66-lohit-bengali.conf new file mode 100644 index 000000000..fb6bffef1 --- /dev/null +++ b/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/66-lohit-bengali.conf @@ -0,0 +1,32 @@ + + + + + + bn + + + sans-serif + + + Lohit Bengali + + + + + + Lohit Bengali + + + true + + + + + Lohit Bengali + + sans-serif + + + + diff --git a/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/AUTHORS b/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/AUTHORS new file mode 100644 index 000000000..ce2775c3a --- /dev/null +++ b/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/AUTHORS @@ -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 diff --git a/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/COPYRIGHT b/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/COPYRIGHT new file mode 100644 index 000000000..ec59324d1 --- /dev/null +++ b/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/COPYRIGHT @@ -0,0 +1,7 @@ +Copyright 2011-12 Lohit Fonts Project contributors. + + + Licensed under the SIL Open Font License 1.1 (see file + OFL.txt) + + Lohit is a trademark of Red Hat, Inc. diff --git a/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/ChangeLog b/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/ChangeLog new file mode 100644 index 000000000..d0f16bd31 --- /dev/null +++ b/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/ChangeLog @@ -0,0 +1,25 @@ + lohit-bengali +Current Version :- 2.5.3 + +* Fri Dec 21 2012 Pravin Satpute - 2.5.3 +- Dropping RFN from OFL.txt + +* Thu Nov 08 2012 Pravin Satpute - 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 - 2.5.1 +- added U+09FB character +- added autohint instruction in conf file + +* Wed Sep 21 2011 Pravin Satpute - 2.5.0 +- relicensing to OFL 1.1 + +* Tue Aug 30 2011 Pravin Satpute - 2.4.3.1 +- minor release, added makefile in tarball + +* Fri Aug 28 2009 Pravin Satpute - 2.4.3 +- first release with split tarball +- see Changelog.old for previous changes + diff --git a/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/ChangeLog.old b/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/ChangeLog.old new file mode 100644 index 000000000..019e5cd41 --- /dev/null +++ b/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/ChangeLog.old @@ -0,0 +1,175 @@ + fonts-indic +Current Version :- 2.4.3 +* Wed Sep 09 2009 Pravin Satpute - 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 - 2.4.2 +- added conf file for all fonts +- contributions from Parag Nemade for conf files + +* Wed Aug 12 2009 Pravin Satpute - 2.4.1 +- Update Copyright + +* Tue Aug 04 2009 Pravin Satpute - 2.4.0 +- Added Unicode 5.1 support in All Lohit fonts + +* Thu Mar 05 2009 Rahul Bhalerao - 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 - 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 - 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 +- Bug 445176: [ml_IN] Conjuncts combining with 0D30 do not form the pre based glyph + +* Fri Jun 06 2008 Rahul Bhalerao +- Improved Anchoring(blwm Anchor-0) for Hindi font. +- Corrected positioning of U+0953 for Hindi font. + +* Tue Apr 29 2008 Rahul Bhalerao - 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 - 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 - 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 - 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 - 2.1.7 +- Updated the makedist.sh script + +* Tue Jan 15 2008 Rahul Bhalerao - 2.1.7 +- Bug 233419: [kn_IN] GSUB's combinaing with additional dependent vowel are +not rendering correctly + +* Fri Dec 14 2007 Rahul Bhalerao - 2.1.6 +- Bug 234284: [pa_IN] Enlarge size for asterik(*) + +* Mon Mar 26 2007 Parag Nemade - 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 - 2.1.4 +- Resolved Bugs from Parag Nemade +- Bug 221383: [kn_IN] GSUB combinations has problem with Ra + +* Mon Feb 19 2007 Parag Nemade - 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 - 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 - 2.1.1 +- Added makedist.sh, generate.sh and generate.pe script files. + +* Fri Jan 12 2007 Parag Nemade - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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) diff --git a/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/Lohit-Bengali.ttf b/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/Lohit-Bengali.ttf new file mode 100644 index 000000000..2f537a191 Binary files /dev/null and b/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/Lohit-Bengali.ttf differ diff --git a/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/OFL.txt b/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/OFL.txt new file mode 100644 index 000000000..01b830782 --- /dev/null +++ b/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/OFL.txt @@ -0,0 +1,94 @@ +Copyright 2011-12 Lohit Fonts Project contributors + + +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. diff --git a/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/README b/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/README new file mode 100644 index 000000000..e4f820750 --- /dev/null +++ b/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/README @@ -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 + + + diff --git a/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/README.cvs b/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/README.cvs new file mode 100644 index 000000000..59dafe942 --- /dev/null +++ b/tests/visual_tests/fonts/lohit-bengali-ttf-2.5.3/README.cvs @@ -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. + diff --git a/tests/visual_tests/styles/hb-fontsets.xml b/tests/visual_tests/styles/hb-fontsets.xml index b3f111947..0c68cd834 100644 --- a/tests/visual_tests/styles/hb-fontsets.xml +++ b/tests/visual_tests/styles/hb-fontsets.xml @@ -1,6 +1,8 @@ - + My Style diff --git a/tests/visual_tests/styles/khmer.xml b/tests/visual_tests/styles/khmer.xml index 4bcf10e33..0ee8b9e1b 100644 --- a/tests/visual_tests/styles/khmer.xml +++ b/tests/visual_tests/styles/khmer.xml @@ -1,6 +1,8 @@ - + My Style diff --git a/tests/visual_tests/styles/lines-4.xml b/tests/visual_tests/styles/lines-4.xml index 61697bed1..d8f7f2295 100644 --- a/tests/visual_tests/styles/lines-4.xml +++ b/tests/visual_tests/styles/lines-4.xml @@ -14,7 +14,7 @@ diff --git a/tests/visual_tests/styles/lines-6.xml b/tests/visual_tests/styles/lines-6.xml index 2e823d885..e8eb35109 100644 --- a/tests/visual_tests/styles/lines-6.xml +++ b/tests/visual_tests/styles/lines-6.xml @@ -1,7 +1,9 @@ - + My Style diff --git a/tests/visual_tests/styles/orientation.xml b/tests/visual_tests/styles/orientation.xml index e0e283b78..0f7832be9 100644 --- a/tests/visual_tests/styles/orientation.xml +++ b/tests/visual_tests/styles/orientation.xml @@ -48,17 +48,17 @@ [nr] = 8 - "XYZ" + "XYZ" [nr] = 9 - "XYZ" + "XYZ" [nr] = 10 - "XYZ" + "XYZ" diff --git a/tests/visual_tests/styles/text-bengali.xml b/tests/visual_tests/styles/text-bengali.xml index 1aa40b649..361e4a98a 100644 --- a/tests/visual_tests/styles/text-bengali.xml +++ b/tests/visual_tests/styles/text-bengali.xml @@ -1,25 +1,32 @@ - + + + - My Style - - csv - ../data/points.csv - + My Style + + csv + ../data/points.csv + -1,-1,1,1 + diff --git a/tests/visual_tests/styles/text-bug1533.xml b/tests/visual_tests/styles/text-bug1533.xml index 9ca8dcb98..bc4bc14b4 100644 --- a/tests/visual_tests/styles/text-bug1533.xml +++ b/tests/visual_tests/styles/text-bug1533.xml @@ -15,13 +15,13 @@ [type] != "boundary" and [mapnik::geometry_type]=linestring - "right: -->" - "left: <--" - "right: -->" + "left: <--" + "left only <--" - "right only -->" - "-->" - "<--" + "right only -->" + "-->" + "<--" diff --git a/tests/visual_tests/styles/text-halign.xml b/tests/visual_tests/styles/text-halign.xml index d0e67dd20..0ed02d1f6 100644 --- a/tests/visual_tests/styles/text-halign.xml +++ b/tests/visual_tests/styles/text-halign.xml @@ -14,7 +14,7 @@ diff --git a/tests/visual_tests/styles/text-malayalam.xml b/tests/visual_tests/styles/text-malayalam.xml index b516cb300..a1fa8ca63 100644 --- a/tests/visual_tests/styles/text-malayalam.xml +++ b/tests/visual_tests/styles/text-malayalam.xml @@ -1,17 +1,20 @@ - + + - My Style - - csv - ../data/points.csv - + My Style + + csv + ../data/points.csv + -1,-1,1,1 +