googlefonts / sfntly

A Library for Using, Editing, and Creating SFNT-based Fonts
451 stars 162 forks source link

Fix the incompatible type of UChar and char16_t #107

Closed gvictor closed 5 years ago

gvictor commented 5 years ago

UChar is not always char16_t in some platforms. In some cases, it's wchar_t or uint16_t.

Use std::basic_string to avoid std::u16string.

The breakage was introduced in https://github.com/googlei18n/sfntly/pull/105

gvictor commented 5 years ago

I can now compile successfully with ICU 57. "make chrome_subsetter sfntly"

gvictor commented 5 years ago

@markusicu, could you review this from ICU perspective?

I am not familiar with the historic issue of UChar. The issue in Chromium can be found here. https://github.com/googlei18n/sfntly/pull/105#issuecomment-452288613