diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-29 20:19:12 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-29 20:19:12 +0000 |
commit | c512b99ea3cb3d7c275850988336804d46f4d529 (patch) | |
tree | 99987d2e2f5f2caba481d5a1ca0c1526d8e5aace /webkit/glue/plugins/ppb_private.h | |
parent | 5c49bf95389c06ed30d3414bc6cdb0c894522df9 (diff) | |
download | chromium_src-c512b99ea3cb3d7c275850988336804d46f4d529.zip chromium_src-c512b99ea3cb3d7c275850988336804d46f4d529.tar.gz chromium_src-c512b99ea3cb3d7c275850988336804d46f4d529.tar.bz2 |
Hook up the new font API to WebKit. This moves the existing GetFontTable API to
the private font interface.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/3044029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54173 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins/ppb_private.h')
-rw-r--r-- | webkit/glue/plugins/ppb_private.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/webkit/glue/plugins/ppb_private.h b/webkit/glue/plugins/ppb_private.h index a0956f0..24831c1 100644 --- a/webkit/glue/plugins/ppb_private.h +++ b/webkit/glue/plugins/ppb_private.h @@ -5,6 +5,7 @@ #ifndef WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ #define WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ +#include "third_party/ppapi/c/pp_module.h" #include "third_party/ppapi/c/pp_var.h" #define PPB_PRIVATE_INTERFACE "PPB_Private;1" @@ -13,9 +14,64 @@ typedef enum _pp_ResourceString { PP_RESOURCESTRING_PDFGETPASSWORD = 0, } PP_ResourceString; +typedef enum _pp_PrivateFontPitch { + PP_PRIVATEFONTPITCH_DEFAULT = 0, + PP_PRIVATEFONTPITCH_FIXED = 1 +} PP_PrivateFontPitch; + +typedef enum _pp_PrivateFontFamily { + PP_PRIVATEFONTFAMILY_DEFAULT = 0, + PP_PRIVATEFONTFAMILY_ROMAN = 1, + PP_PRIVATEFONTFAMILY_SCRIPT = 2 +} PP_PrivateFontFamily; + +typedef enum _pp_PrivateFontCharset { + PP_PRIVATEFONTCHARSET_ANSI = 0, + PP_PRIVATEFONTCHARSET_DEFAULT = 1, + PP_PRIVATEFONTCHARSET_SYMBOL = 2, + PP_PRIVATEFONTCHARSET_MAC = 77, + PP_PRIVATEFONTCHARSET_SHIFTJIS = 128, + PP_PRIVATEFONTCHARSET_HANGUL = 129, + PP_PRIVATEFONTCHARSET_JOHAB = 130, + PP_PRIVATEFONTCHARSET_GB2312 =134, + PP_PRIVATEFONTCHARSET_CHINESEBIG5 = 136, + PP_PRIVATEFONTCHARSET_GREEK = 161, + PP_PRIVATEFONTCHARSET_TURKISH = 162, + PP_PRIVATEFONTCHARSET_VIETNAMESE = 163, + PP_PRIVATEFONTCHARSET_HEBREW = 177, + PP_PRIVATEFONTCHARSET_ARABIC = 178, + PP_PRIVATEFONTCHARSET_BALTIC = 186, + PP_PRIVATEFONTCHARSET_RUSSIAN = 204, + PP_PRIVATEFONTCHARSET_THAI = 222, + PP_PRIVATEFONTCHARSET_EASTEUROPE = 238, + PP_PRIVATEFONTCHARSET_OEM = 255 +} PP_PrivateFontCharset; + +typedef struct _pp_PrivateFontFileDescription { + const char* face; + uint32_t weight; + bool italic; + PP_PrivateFontPitch pitch; + PP_PrivateFontFamily family; + PP_PrivateFontCharset charset; +} PP_PrivateFontFileDescription; + typedef struct _ppb_Private { // Returns a localized string. PP_Var (*GetLocalizedString)(PP_ResourceString string_id); + + // Returns a resource identifying a font file corresponding to the given font + // request after applying the browser-specific fallback. Linux only. + PP_Resource (*GetFontFileWithFallback)( + PP_Module module, + const PP_PrivateFontFileDescription* description); + + // Given a resource previously returned by GetFontFileWithFallback, returns + // a pointer to the requested font table. Linux only. + bool (*GetFontTableForPrivateFontFile)(PP_Resource font_file, + uint32_t table, + void* output, + uint32_t* output_length); } PPB_Private; #endif // WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ |