dear everyone:
I make the textBlob according to skshaper.main function is the below.
sk_sp<SkTextBlob> CreateSkTextBlob(const std::string& content, const FontData& font, double maxWidth, Alignment type) {
std::unique_ptr<SkShaper> fShaper;
fShaper = SkShaper::Make();
const char* utf8 = content.c_str();
size_t utf8Bytes = content.size();
SkShaper::PurgeCaches();
SkTextBlobBuilderRunHandler builder(utf8, {0, 0});
fShaper->shape(utf8, utf8Bytes, get_skia_Font(), true, maxWidth, &builder);
return builder.makeBlob();
}
i get the textblob. and i draw the text the backgroud which is filled by the bounds of text. i found the bounds is larger in the right when the characters are letter or number.However the characters are chinese,the bounds is right. i use the font family is Arial.The effect is below a picture.
In addition, i develop in the macos and win 10. i can display chinese In the mac but in the win10, i can not display chinese,if i use use Arial font.
I do not konw why the come out,and do not konw how to solve this problem.Hoping for everyone help.Give my best regards for your help.