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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
--- a/src/fontdiff/diff_job.cc
+++ b/src/fontdiff/diff_job.cc
@@ -132,7 +132,7 @@ void DiffJob::HandleEndElement() {
xmlElements_.pop_back();
}
-void DiffJob::HandleCharData(const StringPiece& text) {
+void DiffJob::HandleCharData(const icu::StringPiece& text) {
const XMLElement& e = xmlElements_.back();
e.paragraph->AppendSpan(text, e.style);
}
--- a/src/fontdiff/diff_job.h
+++ b/src/fontdiff/diff_job.h
@@ -62,7 +62,7 @@ class DiffJob {
const std::string& name,
const std::map<std::string, std::string>& attr);
void HandleEndElement();
- void HandleCharData(const StringPiece& text);
+ void HandleCharData(const icu::StringPiece& text);
bool has_diffs_;
const FontCollection* beforeFonts_;
--- a/src/fontdiff/paragraph.cc
+++ b/src/fontdiff/paragraph.cc
@@ -300,7 +300,7 @@ void Paragraph::FindPotentialLineBreaks(int32_t start, int32_t limit,
if (breaker) {
breaker->setText(text_);
int32_t cur = breaker->following(start > 0 ? start - 1 : 0);
- while (cur != BreakIterator::DONE && cur < limit) {
+ while (cur != icu::BreakIterator::DONE && cur < limit) {
breaks->push_back(cur);
cur = breaker->next();
}
--- a/src/fontdiff/shaped_text.cc
+++ b/src/fontdiff/shaped_text.cc
@@ -21,7 +21,7 @@
#include <hb.h>
#include <hb-ft.h>
#include <hb-icu.h>
-#include <unicode/unistr.h>
+#include <unicode/ustring.h>
#include "fontdiff/font.h"
#include "fontdiff/icu_helper.h"
@@ -39,7 +39,7 @@ ShapedText::ShapedText(const UChar* text, int32_t start, int32_t limit,
hb_buffer_(hb_buffer_create()), ascender_(0), descender_(0) {
const int32_t length = limit - start;
hb_buffer_set_unicode_funcs(hb_buffer_, hb_icu_get_unicode_funcs());
- hb_buffer_add_utf16(hb_buffer_, text + start, length, 0, length);
+ hb_buffer_add_utf16(hb_buffer_, (uint16_t*)text + start, length, 0, length);
hb_buffer_set_cluster_level(hb_buffer_,
HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS);
hb_segment_properties_t props;
|