Pepper_31_C_interfaces
Public Attributes | List of all members
PPB_TrueTypeFont_Dev_0_1 Struct Reference

#include <ppb_truetype_font_dev.h>

Collaboration diagram for PPB_TrueTypeFont_Dev_0_1:
Collaboration graph

Public Attributes

int32_t(* GetFontFamilies )(PP_Instance instance, struct PP_ArrayOutput output, struct PP_CompletionCallback callback)
 
int32_t(* GetFontsInFamily )(PP_Instance instance, struct PP_Var family, struct PP_ArrayOutput output, struct PP_CompletionCallback callback)
 
PP_Resource(* Create )(PP_Instance instance, const struct PP_TrueTypeFontDesc_Dev *desc)
 
PP_Bool(* IsTrueTypeFont )(PP_Resource resource)
 
int32_t(* Describe )(PP_Resource font, struct PP_TrueTypeFontDesc_Dev *desc, struct PP_CompletionCallback callback)
 
int32_t(* GetTableTags )(PP_Resource font, struct PP_ArrayOutput output, struct PP_CompletionCallback callback)
 
int32_t(* GetTable )(PP_Resource font, uint32_t table, int32_t offset, int32_t max_data_length, struct PP_ArrayOutput output, struct PP_CompletionCallback callback)
 

Detailed Description

Definition at line 168 of file ppb_truetype_font_dev.h.

Member Data Documentation

PP_Resource(* PPB_TrueTypeFont_Dev_0_1::Create)(PP_Instance instance, const struct PP_TrueTypeFontDesc_Dev *desc)

Creates a font resource matching the given font characteristics. The resource id will be non-zero on success, or zero on failure.

Parameters
[in]instanceA PP_Instance to own the font.
[in]descA pointer to a PP_TrueTypeFontDesc describing the font.

Definition at line 215 of file ppb_truetype_font_dev.h.

int32_t(* PPB_TrueTypeFont_Dev_0_1::Describe)(PP_Resource font, struct PP_TrueTypeFontDesc_Dev *desc, struct PP_CompletionCallback callback)

Returns a description of the given font resource. This description may differ from the description passed to Create, reflecting the host's font matching and fallback algorithm.

Parameters
[in]fontA PP_Resource corresponding to a font.
[out]descA pointer to a PP_TrueTypeFontDesc to hold the description. The internal 'family' PP_Var should be set to undefined, since this function overwrites the PP_TrueTypeFontDesc. After successful completion, the family will be set to a PP_Var with a single reference, which the caller must release after use.
[in]callbackA PP_CompletionCallback to be called upon completion of Describe.
Returns
A return code from pp_errors.h. If an error code is returned, the PP_TrueTypeFontDesc will be unchanged.

Definition at line 243 of file ppb_truetype_font_dev.h.

int32_t(* PPB_TrueTypeFont_Dev_0_1::GetFontFamilies)(PP_Instance instance, struct PP_ArrayOutput output, struct PP_CompletionCallback callback)

Gets an array of TrueType font family names available on the host. These names can be used to create a font from a specific family.

Parameters
[in]instanceA PP_Instance requesting the family names.
[in]outputA PP_ArrayOutput to hold the names. The output is an array of PP_Vars, each holding a family name.
[in]callbackA PP_CompletionCallback to be called upon completion of GetFontFamilies.
Returns
If >= 0, the number of family names returned, otherwise an error code from pp_errors.h.

Definition at line 182 of file ppb_truetype_font_dev.h.

int32_t(* PPB_TrueTypeFont_Dev_0_1::GetFontsInFamily)(PP_Instance instance, struct PP_Var family, struct PP_ArrayOutput output, struct 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.

Parameters
[in]instanceA PP_Instance requesting the font descriptors.
[in]familyA PP_Var holding a string specifying the font family.
[in]outputA PP_ArrayOutput to hold the descriptors. The output is an array of PP_TrueTypeFontDesc structs. Each desc contains a PP_Var for the family name which must be released.
[in]callbackA PP_CompletionCallback to be called upon completion of GetFontsInFamily.
Returns
If >= 0, the number of font descriptors returned, otherwise an error code from pp_errors.h.

Definition at line 203 of file ppb_truetype_font_dev.h.

int32_t(* PPB_TrueTypeFont_Dev_0_1::GetTable)(PP_Resource font, uint32_t table, int32_t offset, int32_t max_data_length, struct PP_ArrayOutput output, struct PP_CompletionCallback callback)

Copies the given font table into client memory.

Parameters
[in]fontA PP_Resource corresponding to a font.
[in]tableA 4 byte value indicating which table to copy. For example, 'glyf' will cause the outline table to be copied into the output array. A zero tag value will cause the entire font to be copied.
[in]offsetThe offset into the font table.
[in]max_data_lengthThe maximum number of bytes to transfer from offset.
[in]outputA PP_ArrayOutput to hold the font data. The output is an array of bytes.
[in]callbackA PP_CompletionCallback to be called upon completion of GetTable.
Returns
If >= 0, the table size in bytes, otherwise an error code from pp_errors.h.

Definition at line 280 of file ppb_truetype_font_dev.h.

int32_t(* PPB_TrueTypeFont_Dev_0_1::GetTableTags)(PP_Resource font, struct PP_ArrayOutput output, struct 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.

Parameters
[in]fontA PP_Resource corresponding to a font.
[in]outputA PP_ArrayOutput to hold the tags. The output is an array of 4 byte integers, each representing a table tag.
[in]callbackA PP_CompletionCallback to be called upon completion of GetTableTags.
Returns
If >= 0, the number of table tags returned, otherwise an error code from pp_errors.h.

Definition at line 259 of file ppb_truetype_font_dev.h.

PP_Bool(* PPB_TrueTypeFont_Dev_0_1::IsTrueTypeFont)(PP_Resource resource)

Determines if the given resource is a TrueType font.

Parameters
[in]resourceA PP_Resource corresponding to a resource.
Returns
PP_TRUE if the resource is a PPB_TrueTypeFont_Dev, PP_FALSE otherwise.

Definition at line 225 of file ppb_truetype_font_dev.h.


The documentation for this struct was generated from the following file: