Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Issue 1302573002: Use portable code for family names with DirectWrite. (Closed)

Created:
5 years, 4 months ago by bungeman-skia
Modified:
5 years, 4 months ago
Reviewers:
drott, mtklein
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Use portable code for family names with DirectWrite. IDWriteFamily::GetFamilyNames appears to be 'helpful' and removes parts of family names that look like style names. Since the iterator is supposed to return the actual names and not just the name the platform thinks the name is (as getFamilyName does), try returning the raw names when possible. BUG=skia:4217 Committed: https://skia.googlesource.com/skia/+/f05271581fc6204c2b7ccf146af5d02eec27e670

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -4 lines) Patch
M src/ports/SkTypeface_win_dw.cpp View 2 chunks +9 lines, -4 lines 1 comment Download

Messages

Total messages: 12 (5 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1302573002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1302573002/1
5 years, 4 months ago (2015-08-18 15:42:44 UTC) #2
bungeman-skia
5 years, 4 months ago (2015-08-18 16:16:47 UTC) #5
mtklein
lgtm
5 years, 4 months ago (2015-08-18 16:21:11 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1302573002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1302573002/1
5 years, 4 months ago (2015-08-18 16:33:33 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://skia.googlesource.com/skia/+/f05271581fc6204c2b7ccf146af5d02eec27e670
5 years, 4 months ago (2015-08-18 16:34:10 UTC) #9
drott
Great! Thanks for the very quick fix! The tests are working now on Windows. Just ...
5 years, 4 months ago (2015-08-19 08:28:11 UTC) #11
bungeman-skia
5 years, 4 months ago (2015-08-19 14:10:49 UTC) #12
Message was sent while issue was closed.
On 2015/08/19 08:28:11, drott wrote:
> Great! Thanks for the very quick fix! The tests are working now on Windows.
Just
> one remark regarding the non-iterator method.
> 
>
https://codereview.chromium.org/1302573002/diff/1/src/ports/SkTypeface_win_dw...
> File src/ports/SkTypeface_win_dw.cpp (right):
> 
>
https://codereview.chromium.org/1302573002/diff/1/src/ports/SkTypeface_win_dw...
> src/ports/SkTypeface_win_dw.cpp:30: SkTScopedComPtr<IDWriteLocalizedStrings>
> familyNames;
> How about here? Should this implementation perhaps just return the first from
> the list that the iterator produces?

I don't think so. getFamilyName is supposed to return the family name as the
underlying system thinks of it, which may or may not be a name in the font
itself. For example, on GDI this will return 'Helvetica' for the 'Arial' font if
it was originally requested as 'Helvetica'. With FontConfig this will return
some name of the font as reported by the match, which might be supplied by the
user. Also, getFamilyName is the name as requested in the locale of the request,
which may also be a different thing.

Powered by Google App Engine
This is Rietveld 408576698