Commit 5c23fe6e authored by Emil A Eklund's avatar Emil A Eklund Committed by Commit Bot

Parse font family names as UTF-8 instead of latin-1

Change FontPlatformData::FontFamilyName to parse the font family name as
UTF-8 instead of latin-1 as that is the encoding of the localized family
name provided by the API. Verified on Linux, Windows 7/10, and Mac OS X.

No test as I was unable to find a font with a localized non-latin family
name under a suitable license.

Bug: 667154
Change-Id: Iddb7932b68681824062cc2a7bf163459fc356cbb
Reviewed-on: https://chromium-review.googlesource.com/807527Reviewed-by: default avatarStefan Zager <szager@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521588}
parent e8d7bd37
......@@ -239,7 +239,7 @@ String FontPlatformData::FontFamilyName() const {
!localized_string.fString.size()) {
}
font_family_iterator->unref();
return String(localized_string.fString.c_str());
return String::FromUTF8(localized_string.fString.c_str());
}
SkTypeface* FontPlatformData::Typeface() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment