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 6460c1797e1c9a3ad2d6f2bd09ffbf37c13e1440..b327eec681b4f3e0c3c1aa28c86ac47f138dc945 100644 |
--- a/ppapi/api/dev/ppb_truetype_font_dev.idl |
+++ b/ppapi/api/dev/ppb_truetype_font_dev.idl |
@@ -34,7 +34,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 { |
@@ -43,7 +43,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 { |
@@ -59,7 +59,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 { |
@@ -75,7 +75,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 { |
@@ -101,8 +101,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 { |
@@ -117,14 +117,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 |
@@ -155,6 +160,30 @@ 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. |
+ * @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>. |
+ */ |
+ [singleton,api=PPB_TrueTypeFont_Singleton_API] |
+ 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. |
* |
@@ -168,7 +197,7 @@ interface PPB_TrueTypeFont_Dev { |
/** |
* 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. |
@@ -197,8 +226,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. |