Chromium Code Reviews| Index: ppapi/api/dev/ppb_truetype_font_dev.idl |
| diff --git a/ppapi/api/dev/ppb_truetype_font_dev.idl b/ppapi/api/dev/ppb_truetype_font_dev.idl |
| index 9775d98713e71409b6f412c522e9b98558455538..99ac781a980b22561f037a42cf5a609ed215801d 100644 |
| --- a/ppapi/api/dev/ppb_truetype_font_dev.idl |
| +++ b/ppapi/api/dev/ppb_truetype_font_dev.idl |
| @@ -31,7 +31,7 @@ enum PP_TrueTypeFontFamily_Dev { |
| }; |
| /** |
| - * The PP_TrueTypeFontStyle_Dev defines font styles. |
| + * The PP_TrueTypeFontStyle_Dev enum defines font styles. |
| */ |
| [assert_size(4)] |
| enum PP_TrueTypeFontStyle_Dev { |
| @@ -40,7 +40,7 @@ enum PP_TrueTypeFontStyle_Dev { |
| }; |
| /** |
| - * The PP_TrueTypeFontWeight_Dev defines font weights. |
| + * The PP_TrueTypeFontWeight_Dev enum defines font weights. |
| */ |
| [assert_size(4)] |
| enum PP_TrueTypeFontWeight_Dev { |
| @@ -56,7 +56,7 @@ enum PP_TrueTypeFontWeight_Dev { |
| }; |
| /** |
| - * The PP_TrueTypeFontWidth_Dev defines font widths. |
| + * The PP_TrueTypeFontWidth_Dev enum defines font widths. |
| */ |
| [assert_size(4)] |
| enum PP_TrueTypeFontWidth_Dev { |
| @@ -72,7 +72,7 @@ enum PP_TrueTypeFontWidth_Dev { |
| }; |
| /** |
| - * The PP_TrueTypeFontCharset defines font character sets. |
| + * The PP_TrueTypeFontCharset enum defines font character sets. |
| */ |
| [assert_size(4)] |
| enum PP_TrueTypeFontCharset_Dev { |
| @@ -98,8 +98,8 @@ enum PP_TrueTypeFontCharset_Dev { |
| }; |
| /** |
| - * The <code>PP_TrueTypeFontDesc</code> structure describes a TrueType font. It |
| - * is passed to Create, and returned by Describe. |
| + * The <code>PP_TrueTypeFontDesc</code> struct describes a TrueType font. It is |
| + * passed to Create(), and returned by Describe(). |
| */ |
| [assert_size(40)] |
| struct PP_TrueTypeFontDesc_Dev { |
| @@ -114,14 +114,19 @@ struct PP_TrueTypeFontDesc_Dev { |
| /** This value specifies a generic font family. If a family name string is |
| * provided when creating a font, this is ignored. */ |
| PP_TrueTypeFontFamily_Dev generic_family; |
| + |
| /** This value specifies the font style. */ |
| PP_TrueTypeFontStyle_Dev style; |
| + |
| /** This value specifies the font weight. */ |
| PP_TrueTypeFontWeight_Dev weight; |
| + |
| /** This value specifies the font width, for condensed or expanded fonts */ |
| PP_TrueTypeFontWidth_Dev width; |
| + |
| /** This value specifies a character set. */ |
| PP_TrueTypeFontCharset_Dev charset; |
| + |
| /** |
| * Ensure that this struct is 40-bytes wide by padding the end. In some |
| * compilers, PP_Var is 8-byte aligned, so those compilers align this struct |
| @@ -151,6 +156,29 @@ interface PPB_TrueTypeFont_Dev { |
| [in] PP_CompletionCallback callback); |
| /** |
| + * Gets an array of TrueType font descriptors for a given font family. These |
| + * descriptors can be used to create a font in that family and matching the |
| + * descriptor attributes. |
| + * |
| + * @param[in] instance A <code>PP_Instance</code> requesting the font |
| + * descriptors. |
| + * @param[in] family A <code>PP_Var</code> holding a string specifying the |
| + * font family. |
| + * @param[in] output A <code>PP_ArrayOutput</code> to hold the descriptors. |
| + * The output is an array of <code>PP_TrueTypeFontDesc</code> structs. Each |
| + * desc contains a PP_Var for the family name which must be released. |
|
dmichael (off chromium)
2013/04/12 23:34:18
This is inconsistent with what you say in your Res
bbudge
2013/04/13 00:44:44
This is the behavior now. I'll update the comment
|
| + * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
| + * completion of GetFontsInFamily. |
| + * |
| + * @return If >= 0, the number of font descriptors returned, otherwise an |
| + * error code from <code>pp_errors.h</code>. |
| + */ |
| + int32_t GetFontsInFamily([in] PP_Instance instance, |
| + [in] PP_Var family, |
| + [in] PP_ArrayOutput output, |
| + [in] PP_CompletionCallback callback); |
| + |
| + /** |
| * Creates a font resource matching the given font characteristics. The |
| * resource id will be non-zero on success, or zero on failure. |
| * |
| @@ -162,14 +190,14 @@ interface PPB_TrueTypeFont_Dev { |
| [in] PP_TrueTypeFontDesc_Dev desc); |
| /** |
| - * Determines if the given resource is a font. |
| + * Determines if the given resource is a TrueType font. |
| * |
| - * @param[in] resource A <code>PP_Resource</code> corresponding to a font. |
| + * @param[in] resource A <code>PP_Resource</code> corresponding to a resource. |
| * |
| * @return <code>PP_TRUE</code> if the resource is a |
| * <code>PPB_TrueTypeFont_Dev</code>, <code>PP_FALSE</code> otherwise. |
| */ |
| - PP_Bool IsFont([in] PP_Resource resource); |
| + PP_Bool IsTrueTypeFont([in] PP_Resource resource); |
| /** |
| * Returns a description of the given font resource. This description may |
| @@ -193,8 +221,8 @@ interface PPB_TrueTypeFont_Dev { |
| [in] PP_CompletionCallback callback); |
| /** |
| - * Gets an array of identifying tags for each table in the font. |
| - * These tags can be used to request specific tables using GetTable. |
| + * Gets an array of identifying tags for each table in the font. These tags |
| + * can be used to request specific tables using GetTable. |
| * |
| * @param[in] font A <code>PP_Resource</code> corresponding to a font. |
| * @param[in] output A <code>PP_ArrayOutput</code> to hold the tags. |