one more time.
This commit is contained in:
parent
8726312393
commit
8dea549887
1 changed files with 9 additions and 8 deletions
|
@ -7,7 +7,8 @@
|
|||
namespace {
|
||||
|
||||
void test_shaping( mapnik::font_set const& fontset, mapnik::face_manager& fm,
|
||||
std::vector<std::tuple<unsigned, unsigned>> const& expected, char const* str, bool debug = false)
|
||||
std::vector<std::tuple<unsigned, unsigned>> expected,
|
||||
char const* str, bool debug = false)
|
||||
{
|
||||
mapnik::transcoder tr("utf8");
|
||||
std::map<unsigned,double> width_map;
|
||||
|
@ -65,7 +66,7 @@ TEST_CASE("shaping")
|
|||
mapnik::face_manager fm(fl, font_file_mapping, font_memory_cache);
|
||||
|
||||
{
|
||||
auto const& expected =
|
||||
auto expected =
|
||||
{std::tuple<unsigned, unsigned>(0, 0), {0, 3}, {0, 4}, {0, 7}, {3, 8}, {11, 9}, {68, 10}, {69, 11}, {70, 12}, {12, 13}};
|
||||
// with default NotoSans-Regular.ttc and NotoNaskhArabic-Regular.ttf ^^^
|
||||
//std::vector<std::pair<unsigned, unsigned>> expected =
|
||||
|
@ -75,29 +76,29 @@ TEST_CASE("shaping")
|
|||
}
|
||||
|
||||
{
|
||||
auto const& expected =
|
||||
auto expected =
|
||||
{std::tuple<unsigned, unsigned>(0, 0), {0, 3}, {0, 4}, {0, 7}, {3, 8}, {11, 9}, {0, 10}, {0, 11}, {0, 12}, {12, 13}};
|
||||
test_shaping(fontset, fm, expected, u8"སྤུ་ཧྲེང (普兰镇)");
|
||||
}
|
||||
|
||||
{
|
||||
auto const& expected =
|
||||
auto expected =
|
||||
{std::tuple<unsigned, unsigned>(68, 0), {69, 1}, {70, 2}, {3, 3}, {11, 4}, {0, 5}, {0, 6}, {0, 7}, {12, 8}};
|
||||
test_shaping(fontset, fm, expected, u8"abc (普兰镇)");
|
||||
}
|
||||
|
||||
{
|
||||
auto const& expected =
|
||||
auto expected =
|
||||
{std::tuple<unsigned, unsigned>(68, 0), {69, 1}, {70, 2}, {3, 3}, {11, 4}, {68, 5}, {69, 6}, {70, 7}, {12, 8}};
|
||||
test_shaping(fontset, fm, expected, "abc (abc)");
|
||||
}
|
||||
|
||||
{
|
||||
// "ⵃⴰⵢ ⵚⵉⵏⴰⵄⵉ الحي الصناعي"
|
||||
auto const& expected =
|
||||
auto expected =
|
||||
{std::tuple<unsigned, unsigned>(0, 0), {0, 1}, {0, 2}, {3, 3}, {0, 4}, {0, 5}, {0, 6}, {0, 7},
|
||||
{0, 8}, {0, 9}, {3, 10}, {509, 22}, {481, 21}, {438, 20}, {503, 19},
|
||||
{470, 18}, {496, 17}, {43, 16}, {3, 15}, {509, 14}, {454, 13}, {496, 12}, {43, 11}};
|
||||
{0, 8}, {0, 9}, {3, 10}, {509, 22}, {481, 21}, {438, 20}, {503, 19},
|
||||
{470, 18}, {496, 17}, {43, 16}, {3, 15}, {509, 14}, {454, 13}, {496, 12}, {43, 11}};
|
||||
test_shaping(fontset, fm, expected, u8"ⵃⴰⵢ ⵚⵉⵏⴰⵄⵉ الحي الصناعي");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue