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

Issue 1818043002: SkTypeface::MakeFromName to take SkFontStyle. (Closed)

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

Description

SkTypeface::MakeFromName to take SkFontStyle. SkTypeface::MakeFromName currently takes SkTypeface::Style, which is quite limited. This starts the transition to this function taking SkFontStyle instead. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1818043002 TBR=reed He said it sounded like a good idea. Committed: https://skia.googlesource.com/skia/+/ee6a9919a362e16c1d84a870ce867d1ad7b8a141

Patch Set 1 #

Total comments: 2

Patch Set 2 : Review fixes - remove the method CreateFromNameAndStyle, use the name CreateFromName instead. #

Patch Set 3 : Decrease the change scope for changing the width to a generic one. #

Total comments: 7

Patch Set 4 : CL rebased. #

Patch Set 5 : Add the legacy code back #

Total comments: 2

Patch Set 6 : CL rebased. #

Total comments: 6

Patch Set 7 : Address the issues. #

Total comments: 8

Patch Set 8 : Changed the signature of gCreateTypefaceDelegate #

Patch Set 9 : Remove the unneeded hack. #

Patch Set 10 : Made the old MakeFromName use the new MakeFromName #

Patch Set 11 : Compile fixes #

Total comments: 4

Patch Set 12 : Android fix + nit fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -107 lines) Patch
M bench/SkGlyphCacheBench.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -3 lines 0 comments Download
M bench/TextBlobBench.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M dm/DM.cpp View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M fuzz/FilterFuzz.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M gm/all_bitmap_configs.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M gm/colortype.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M gm/colortypexfermode.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M gm/colorwheel.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M gm/dftext.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M gm/downsamplebitmap.cpp View 1 2 3 4 5 6 7 2 chunks +5 lines, -5 lines 0 comments Download
M gm/filterbitmap.cpp View 1 2 3 4 5 6 7 2 chunks +5 lines, -5 lines 0 comments Download
M gm/fontcache.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -2 lines 0 comments Download
M gm/gammatext.cpp View 1 2 3 4 5 6 7 2 chunks +3 lines, -2 lines 0 comments Download
M gm/textblob.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M gm/textblobrandomfont.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M gm/texteffects.cpp View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M gm/typeface.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M gm/variedtext.cpp View 1 2 3 4 5 6 7 1 chunk +6 lines, -4 lines 0 comments Download
M gm/verttext2.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M include/core/SkTypeface.h View 1 2 3 4 5 6 7 2 chunks +15 lines, -1 line 0 comments Download
M samplecode/ClockFaceView.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M samplecode/SampleAll.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M samplecode/SampleFilterFuzz.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M samplecode/SampleFontScalerTest.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -2 lines 0 comments Download
M samplecode/SampleSlides.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M samplecode/SampleXfermodesBlur.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M src/core/SkTypeface.cpp View 1 2 3 4 5 6 7 8 9 3 chunks +23 lines, -6 lines 0 comments Download
M src/fonts/SkTestScalerContext.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M src/utils/SkLua.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M src/utils/SkWhitelistTypefaces.cpp View 1 2 3 4 5 4 chunks +5 lines, -5 lines 0 comments Download
M tests/FontHostStreamTest.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M tests/FontHostTest.cpp View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M tests/FontMgrTest.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M tests/FontObjTest.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M tests/PDFPrimitivesTest.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M tests/PictureTest.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M tests/TypefaceTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
M tools/sk_tool_utils.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M tools/sk_tool_utils.cpp View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M tools/sk_tool_utils_font.cpp View 1 2 3 4 5 6 7 3 chunks +3 lines, -4 lines 0 comments Download
M tools/test_font_index.cpp View 1 2 3 4 5 6 7 1 chunk +25 lines, -25 lines 0 comments Download

Messages

Total messages: 57 (21 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/1818043002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1818043002/1
4 years, 9 months ago (2016-03-21 16:13:03 UTC) #5
bungeman-skia
See https://codereview.chromium.org/1819753003/ for reasons. https://codereview.chromium.org/1818043002/diff/1/include/core/SkTypeface.h File include/core/SkTypeface.h (right): https://codereview.chromium.org/1818043002/diff/1/include/core/SkTypeface.h#newcode107 include/core/SkTypeface.h:107: static SkTypeface* CreateFromNameAndStyle(const char familyName[], ...
4 years, 9 months ago (2016-03-21 16:14:26 UTC) #8
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-21 16:24:54 UTC) #10
Mikus
On 2016/03/21 16:14:26, bungeman1 wrote: > See https://codereview.chromium.org/1819753003/ for reasons. > > https://codereview.chromium.org/1818043002/diff/1/include/core/SkTypeface.h > File ...
4 years, 9 months ago (2016-03-22 09:56:43 UTC) #11
Mikus
On 2016/03/22 09:56:43, Mikus wrote: > On 2016/03/21 16:14:26, bungeman1 wrote: > > See https://codereview.chromium.org/1819753003/ ...
4 years, 9 months ago (2016-03-22 11:00:18 UTC) #12
bungeman-skia
https://codereview.chromium.org/1818043002/diff/40001/include/core/SkTypeface.h File include/core/SkTypeface.h (right): https://codereview.chromium.org/1818043002/diff/40001/include/core/SkTypeface.h#newcode111 include/core/SkTypeface.h:111: static SkTypeface* CreateFromName(const char familyName[], You're not going to ...
4 years, 9 months ago (2016-03-22 20:16:43 UTC) #13
Mikus
https://codereview.chromium.org/1818043002/diff/40001/src/core/SkTypeface.cpp File src/core/SkTypeface.cpp (right): https://codereview.chromium.org/1818043002/diff/40001/src/core/SkTypeface.cpp#newcode123 src/core/SkTypeface.cpp:123: return fm->matchFamilyStyle(name, fontStyle); On 2016/03/22 20:16:43, bungeman1 wrote: > ...
4 years, 9 months ago (2016-03-23 10:47:17 UTC) #14
Mikus
Also, how do I simultaneously roll Skia with Chromium?
4 years, 9 months ago (2016-03-23 10:48:02 UTC) #15
Mikus
https://codereview.chromium.org/1818043002/diff/40001/include/core/SkTypeface.h File include/core/SkTypeface.h (right): https://codereview.chromium.org/1818043002/diff/40001/include/core/SkTypeface.h#newcode111 include/core/SkTypeface.h:111: static SkTypeface* CreateFromName(const char familyName[], On 2016/03/22 20:16:43, bungeman1 ...
4 years, 9 months ago (2016-03-24 12:08:26 UTC) #16
bungeman-skia
https://codereview.chromium.org/1818043002/diff/80001/src/core/SkTypeface.cpp File src/core/SkTypeface.cpp (right): https://codereview.chromium.org/1818043002/diff/80001/src/core/SkTypeface.cpp#newcode142 src/core/SkTypeface.cpp:142: return fm->matchFamilyStyle(name, fontStyle); I believe Chromium on Linux is ...
4 years, 8 months ago (2016-04-08 18:59:21 UTC) #17
Mikus
https://codereview.chromium.org/1818043002/diff/80001/src/core/SkTypeface.cpp File src/core/SkTypeface.cpp (right): https://codereview.chromium.org/1818043002/diff/80001/src/core/SkTypeface.cpp#newcode142 src/core/SkTypeface.cpp:142: return fm->matchFamilyStyle(name, fontStyle); On 2016/04/08 18:59:21, bungeman-skia wrote: > ...
4 years, 7 months ago (2016-05-19 09:34:02 UTC) #18
Mikus
On 2016/05/19 09:34:02, Mikus wrote: > https://codereview.chromium.org/1818043002/diff/80001/src/core/SkTypeface.cpp > File src/core/SkTypeface.cpp (right): > > https://codereview.chromium.org/1818043002/diff/80001/src/core/SkTypeface.cpp#newcode142 > ...
4 years, 7 months ago (2016-05-20 06:54:07 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1818043002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1818043002/100001
4 years, 7 months ago (2016-05-24 14:42:38 UTC) #21
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/builds/8695) Build-Ubuntu-GCC-Arm64-Debug-Android-Trybot on ...
4 years, 7 months ago (2016-05-24 14:45:29 UTC) #23
bungeman-skia
https://codereview.chromium.org/1818043002/diff/100001/src/core/SkTypeface.cpp File src/core/SkTypeface.cpp (right): https://codereview.chromium.org/1818043002/diff/100001/src/core/SkTypeface.cpp#newcode33 src/core/SkTypeface.cpp:33: sk_sp<SkTypeface> (*gNewCreateTypefaceDelegate)(const char[], SkFontStyle) = nullptr; Only Skia uses ...
4 years, 7 months ago (2016-05-24 14:49:26 UTC) #24
Mikus
https://codereview.chromium.org/1818043002/diff/100001/src/core/SkTypeface.cpp File src/core/SkTypeface.cpp (right): https://codereview.chromium.org/1818043002/diff/100001/src/core/SkTypeface.cpp#newcode33 src/core/SkTypeface.cpp:33: sk_sp<SkTypeface> (*gNewCreateTypefaceDelegate)(const char[], SkFontStyle) = nullptr; On 2016/05/24 14:49:26, ...
4 years, 7 months ago (2016-05-24 15:22:26 UTC) #25
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1818043002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1818043002/120001
4 years, 7 months ago (2016-05-24 15:23:22 UTC) #27
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/builds/8697)
4 years, 7 months ago (2016-05-24 15:26:32 UTC) #29
bungeman-skia
https://codereview.chromium.org/1818043002/diff/120001/src/core/SkTypeface.cpp File src/core/SkTypeface.cpp (right): https://codereview.chromium.org/1818043002/diff/120001/src/core/SkTypeface.cpp#newcode39 src/core/SkTypeface.cpp:39: bool UsesOnlyItalicOrBoldStyling(SkFontStyle style) { I would prefer not to ...
4 years, 7 months ago (2016-05-24 15:29:11 UTC) #30
bungeman-skia
https://codereview.chromium.org/1818043002/diff/120001/src/core/SkTypeface.cpp File src/core/SkTypeface.cpp (right): https://codereview.chromium.org/1818043002/diff/120001/src/core/SkTypeface.cpp#newcode132 src/core/SkTypeface.cpp:132: #ifndef SK_DONT_USE_LEGACY_TYPEFACE_MAKE_FROM_NAME Usually we would add a define to ...
4 years, 7 months ago (2016-05-24 17:45:44 UTC) #31
Mikus
https://codereview.chromium.org/1818043002/diff/120001/src/core/SkTypeface.cpp File src/core/SkTypeface.cpp (right): https://codereview.chromium.org/1818043002/diff/120001/src/core/SkTypeface.cpp#newcode39 src/core/SkTypeface.cpp:39: bool UsesOnlyItalicOrBoldStyling(SkFontStyle style) { On 2016/05/24 15:29:11, bungeman-skia wrote: ...
4 years, 7 months ago (2016-05-25 10:57:25 UTC) #32
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1818043002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1818043002/180001
4 years, 7 months ago (2016-05-25 12:00:06 UTC) #34
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/builds/8707) Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Release-Trybot on ...
4 years, 7 months ago (2016-05-25 12:03:40 UTC) #36
bungeman-skia
Aside from the not compiling part, this looks pretty good. Just wondering, how are you ...
4 years, 7 months ago (2016-05-25 12:16:08 UTC) #37
Mikus
On 2016/05/25 12:16:08, bungeman-skia wrote: > Aside from the not compiling part, this looks pretty ...
4 years, 7 months ago (2016-05-25 14:49:27 UTC) #38
Mikus
On 2016/05/25 14:49:27, Mikus wrote: > On 2016/05/25 12:16:08, bungeman-skia wrote: > > Aside from ...
4 years, 7 months ago (2016-05-25 15:00:05 UTC) #39
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1818043002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1818043002/200001
4 years, 7 months ago (2016-05-26 15:05:48 UTC) #41
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Ubuntu-GCC-Arm64-Debug-Android-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-Arm64-Debug-Android-Trybot/builds/7008)
4 years, 7 months ago (2016-05-26 15:11:40 UTC) #43
bungeman-skia
https://codereview.chromium.org/1818043002/diff/200001/gm/fontcache.cpp File gm/fontcache.cpp (right): https://codereview.chromium.org/1818043002/diff/200001/gm/fontcache.cpp#newcode38 gm/fontcache.cpp:38: SkFontStyle::FromOldStyle(SkTypeface::kItalic)); nit: this is a bit awkward looking since ...
4 years, 7 months ago (2016-05-26 15:39:33 UTC) #44
Mikus
https://codereview.chromium.org/1818043002/diff/200001/gm/fontcache.cpp File gm/fontcache.cpp (right): https://codereview.chromium.org/1818043002/diff/200001/gm/fontcache.cpp#newcode38 gm/fontcache.cpp:38: SkFontStyle::FromOldStyle(SkTypeface::kItalic)); On 2016/05/26 15:39:33, bungeman-skia wrote: > nit: this ...
4 years, 6 months ago (2016-05-30 14:18:39 UTC) #46
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1818043002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1818043002/220001
4 years, 6 months ago (2016-05-31 16:03:59 UTC) #48
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-05-31 16:21:35 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1818043002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1818043002/220001
4 years, 6 months ago (2016-05-31 18:40:05 UTC) #53
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
4 years, 6 months ago (2016-05-31 18:40:07 UTC) #54
bungeman-skia
lgtm
4 years, 6 months ago (2016-05-31 18:40:19 UTC) #55
commit-bot: I haz the power
4 years, 6 months ago (2016-05-31 18:42:42 UTC) #57
Message was sent while issue was closed.
Committed patchset #12 (id:220001) as
https://skia.googlesource.com/skia/+/ee6a9919a362e16c1d84a870ce867d1ad7b8a141

Powered by Google App Engine
This is Rietveld 408576698