File: shaping.cpp

package info (click to toggle)
mapnik 3.0.12%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 17,084 kB
  • ctags: 18,454
  • sloc: cpp: 142,516; python: 1,416; sh: 769; makefile: 170; xml: 140; lisp: 13
file content (25 lines) | stat: -rw-r--r-- 913 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

#include "catch.hpp"
#include <mapnik/text/icu_shaper.hpp>
#include <mapnik/text/harfbuzz_shaper.hpp>
#include <mapnik/text/font_library.hpp>

TEST_CASE("shapers compile") {

    mapnik::text_line line(0,0);
    mapnik::text_itemizer itemizer;
    std::map<unsigned,double> width_map;
    double scale_factor = 1;
    mapnik::font_library fl;
    mapnik::freetype_engine::font_file_mapping_type font_file_mapping;
    mapnik::freetype_engine::font_memory_cache_type font_memory_cache;
    mapnik::face_manager fm(fl,font_file_mapping,font_memory_cache);
    mapnik::harfbuzz_shaper::shape_text(line,itemizer,
                                width_map,
                                fm,
                                scale_factor);
    mapnik::icu_shaper::shape_text(line,itemizer,
                                width_map,
                                fm,
                                scale_factor);
}