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

Issue 13913006: Add Pepper TrueType font API call to enumerate fonts in a given family. (Closed)

Created:
7 years, 8 months ago by bbudge
Modified:
7 years, 8 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, raymes+watch_chromium.org, jam, sail+watch_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, yzshen+watch_chromium.org, piman+watch_chromium.org, ihf+watch_chromium.org
Visibility:
Public.

Description

Add Pepper TrueType font API call to enumerate fonts in a given family. Adds a new function, GetFontsInFamily, to the PPB_TrueTypeFont_Dev interface. This method returns an array of descriptors for every font in the given family on the host platform. Tests are currently disabled for Windows and Mac, since I got failures on XP and OSX 10.6 when landing them originally. I will re-enable them in follow on patches, which will be easier to land / revert if necessary. The tests pass locally for me on all platforms. BUG=79375, 230130 TEST=browser_tests, gtest_filter="PPAPIOutOfProcessTest.TrueTypeFont" Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=195082

Patch Set 1 #

Patch Set 2 : Mac impl and tests. #

Patch Set 3 : Use Describe in test, fix Mac Describe crash. #

Patch Set 4 : Linux impl. #

Patch Set 5 : Linux, Windows tests pass locally. #

Patch Set 6 : Forward declare desc struct. #

Patch Set 7 : Rename IsFont to IsTrueTypeFont. #

Total comments: 14

Patch Set 8 : Address David's comments. #

Patch Set 9 : Fix corner case Var leaks, rebase, fix test. #

Patch Set 10 : Fix Windows build again. #

Total comments: 2

Patch Set 11 : More cleanup. #

Total comments: 4

Patch Set 12 : Fix Windows build. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+536 lines, -68 lines) Patch
M content/browser/renderer_host/pepper/pepper_truetype_font_list.h View 1 2 3 4 5 2 chunks +15 lines, -0 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_truetype_font_list_android.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_truetype_font_list_host.h View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_truetype_font_list_host.cc View 3 chunks +23 lines, -1 line 0 comments Download
M content/browser/renderer_host/pepper/pepper_truetype_font_list_linux.cc View 1 2 3 4 5 2 chunks +40 lines, -1 line 0 comments Download
M content/browser/renderer_host/pepper/pepper_truetype_font_list_mac.mm View 1 2 2 chunks +59 lines, -0 lines 2 comments Download
M content/browser/renderer_host/pepper/pepper_truetype_font_list_win.cc View 1 2 3 4 5 6 7 8 9 2 chunks +47 lines, -8 lines 0 comments Download
M content/renderer/pepper/pepper_truetype_font_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +15 lines, -16 lines 0 comments Download
M content/renderer/pepper/pepper_truetype_font_win.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M ppapi/api/dev/ppb_truetype_font_dev.idl View 1 2 3 4 5 6 7 8 9 chunks +38 lines, -9 lines 0 comments Download
M ppapi/c/dev/ppb_truetype_font_dev.h View 1 2 3 4 5 6 7 8 9 chunks +32 lines, -10 lines 0 comments Download
M ppapi/cpp/dev/truetype_font_dev.h View 1 2 3 4 5 6 7 8 chunks +73 lines, -8 lines 0 comments Download
M ppapi/cpp/dev/truetype_font_dev.cc View 1 2 3 4 5 6 4 chunks +22 lines, -8 lines 0 comments Download
M ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -0 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M ppapi/proxy/truetype_font_resource.cc View 1 2 2 chunks +1 line, -1 line 0 comments Download
M ppapi/proxy/truetype_font_singleton_resource.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +11 lines, -1 line 0 comments Download
M ppapi/proxy/truetype_font_singleton_resource.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +53 lines, -0 lines 0 comments Download
M ppapi/tests/test_truetype_font.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/tests/test_truetype_font.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +62 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_truetype_font_dev_thunk.cc View 1 2 3 4 5 6 7 8 3 chunks +17 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_truetype_font_singleton_api.h View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
bbudge
Brett for content, and Windows, Linux impls. Ben for Mac impl. Mike for overall API ...
7 years, 8 months ago (2013-04-12 17:34:46 UTC) #1
bbudge
On versioning: Justin Teravest is working on thunk auto generation features so we can auto ...
7 years, 8 months ago (2013-04-12 17:38:56 UTC) #2
bbudge
+Justin for ppapi_messages.h (IPC)
7 years, 8 months ago (2013-04-12 17:51:30 UTC) #3
bungeman-skia
The mac impl lgtm.
7 years, 8 months ago (2013-04-12 19:05:59 UTC) #4
dmichael (off chromium)
https://codereview.chromium.org/13913006/diff/28001/ppapi/api/dev/ppb_truetype_font_dev.idl File ppapi/api/dev/ppb_truetype_font_dev.idl (right): https://codereview.chromium.org/13913006/diff/28001/ppapi/api/dev/ppb_truetype_font_dev.idl#newcode169 ppapi/api/dev/ppb_truetype_font_dev.idl:169: * desc contains a PP_Var for the family name ...
7 years, 8 months ago (2013-04-12 23:34:18 UTC) #5
bbudge
https://codereview.chromium.org/13913006/diff/28001/ppapi/api/dev/ppb_truetype_font_dev.idl File ppapi/api/dev/ppb_truetype_font_dev.idl (right): https://codereview.chromium.org/13913006/diff/28001/ppapi/api/dev/ppb_truetype_font_dev.idl#newcode169 ppapi/api/dev/ppb_truetype_font_dev.idl:169: * desc contains a PP_Var for the family name ...
7 years, 8 months ago (2013-04-13 00:44:44 UTC) #6
dmichael (off chromium)
Parts I reviewed look mostly good to me. I think theer's still a corner-case leak. ...
7 years, 8 months ago (2013-04-15 18:11:43 UTC) #7
bbudge
Don't create Vars at all if callback isn't pending. Rebase to pick up Justin's and ...
7 years, 8 months ago (2013-04-17 23:49:19 UTC) #8
dmichael (off chromium)
lgtm for my parts https://codereview.chromium.org/13913006/diff/46003/ppapi/tests/test_truetype_font.cc File ppapi/tests/test_truetype_font.cc (right): https://codereview.chromium.org/13913006/diff/46003/ppapi/tests/test_truetype_font.cc#newcode9 ppapi/tests/test_truetype_font.cc:9: #include <stdio.h> Oops, it's still ...
7 years, 8 months ago (2013-04-18 16:55:33 UTC) #9
bbudge
https://codereview.chromium.org/13913006/diff/46003/ppapi/tests/test_truetype_font.cc File ppapi/tests/test_truetype_font.cc (right): https://codereview.chromium.org/13913006/diff/46003/ppapi/tests/test_truetype_font.cc#newcode9 ppapi/tests/test_truetype_font.cc:9: #include <stdio.h> git troubles. Done. On 2013/04/18 16:55:33, dmichael ...
7 years, 8 months ago (2013-04-18 17:21:06 UTC) #10
brettw
Owners lgtm, I didn't check the details. I noted two style nits: https://codereview.chromium.org/13913006/diff/71001/content/renderer/pepper/pepper_truetype_font_mac.mm File content/renderer/pepper/pepper_truetype_font_mac.mm ...
7 years, 8 months ago (2013-04-18 17:45:05 UTC) #11
bbudge
https://codereview.chromium.org/13913006/diff/71001/content/renderer/pepper/pepper_truetype_font_mac.mm File content/renderer/pepper/pepper_truetype_font_mac.mm (right): https://codereview.chromium.org/13913006/diff/71001/content/renderer/pepper/pepper_truetype_font_mac.mm#newcode26 content/renderer/pepper/pepper_truetype_font_mac.mm:26: CFNumberRef num; On 2013/04/18 17:45:05, brettw wrote: > Check ...
7 years, 8 months ago (2013-04-18 19:40:40 UTC) #12
bbudge
-Justin +Chris for IPC message review, specifically ppapi_messages.h. Feel free to delegate.
7 years, 8 months ago (2013-04-18 19:53:10 UTC) #13
bbudge
Removing Chris, Adding tsepez for IPC review (ppapi_messages.h)
7 years, 8 months ago (2013-04-18 20:46:34 UTC) #14
Tom Sepez
Messages LGTM.
7 years, 8 months ago (2013-04-18 20:50:47 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bbudge@chromium.org/13913006/75002
7 years, 8 months ago (2013-04-18 21:24:08 UTC) #16
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 8 months ago (2013-04-18 21:27:05 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bbudge@chromium.org/13913006/75002
7 years, 8 months ago (2013-04-18 21:32:56 UTC) #18
commit-bot: I haz the power
Presubmit check for 13913006-75002 failed and returned exit status 1. INFO:root:Found 22 file(s). Running presubmit ...
7 years, 8 months ago (2013-04-18 21:33:04 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bbudge@chromium.org/13913006/75002
7 years, 8 months ago (2013-04-18 22:17:55 UTC) #20
commit-bot: I haz the power
Change committed as 195082
7 years, 8 months ago (2013-04-19 03:50:39 UTC) #21
kylesch
fix build for x86_64 where NSInteger is typedef'd as long and parameters passed to std::max ...
7 years, 8 months ago (2013-04-19 05:10:58 UTC) #22
bbudge
7 years, 8 months ago (2013-04-19 10:30:02 UTC) #23
Message was sent while issue was closed.
https://codereview.chromium.org/13913006/diff/75002/content/browser/renderer_...
File content/browser/renderer_host/pepper/pepper_truetype_font_list_mac.mm
(right):

https://codereview.chromium.org/13913006/diff/75002/content/browser/renderer_...
content/browser/renderer_host/pepper/pepper_truetype_font_list_mac.mm:59:
font_weight = std::max(0, font_weight);
Thanks, I can try to land this when I re-enable the test on Mac.
On 2013/04/19 05:10:58, kylesch wrote:
> font_weight = std::max(static_cast<NSInteger>(0), font_weight);

Powered by Google App Engine
This is Rietveld 408576698