This function supplies type to the Typesetter of the specified Standard Engine instance. Type is a set of typographical properties that are applied to the glyphs/characters during rendering. These properties are:
When D-Type Engine is initialized, the default type is not set. Therefore, applications must explicitly set the type before any glyphs/characters can be rendered.
This function utilizes the DT_TYPE_ATTRIBS structure to set the type.
Parameter | Description |
---|---|
engine |
Handle of the previously created Standard Engine instance. |
type |
A valid pointer to the DT_TYPE_ATTRIBS structure. |
reserved |
Reserved for future use. Must be set to 0. |
If successful, the return value is 1. Otherwise, the function returns 0.
DT_TYPE_ATTRIBS type = {MYFONT_SIMPLE, 0, 0, 0, 0, {{200, 200, 0, 0, 20}}}; /* The above initialization is the same as type.font_index = MYFONT_SIMPLE; type.thickness = 0; type.segment = 0; type.reserved = 0; type.descriptor = 0; type.transform.params.size_h = 200; type.transform.params.size_v = 200; type.transform.params.skew_h = 0; type.transform.params.skew_v = 0; type.transform.params.rotation = 20; */ dtTypesetterSetTypeAttribs(engine, &type, 0);
Output of glyph R using the above type:
DT_TYPE_ATTRIBS type = {MYFONT_COURIER, 350, 20, 0, 0, {{500, 250, -14, 0, 0}}}; /* The above initialization is the same as type.font_index = MYFONT_COURIER; type.thickness = 350; type.segment = 20; type.reserved = 0; type.descriptor = 0; type.transform.params.size_h = 500; type.transform.params.size_v = 250; type.transform.params.skew_h = -14; type.transform.params.skew_v = 0; type.transform.params.rotation = 0; */ dtTypesetterSetTypeAttribs(engine, &type, 0);
Output of glyph R using the above type:
DT_TYPE_ATTRIBS type = {MYFONT_SIMPLE, -1500, 0, 0, 0, {{-200, 200, 0, 0, 0}}}; /* The above initialization is the same as type.font_index = MYFONT_SIMPLE; type.thickness = -1500; type.segment = 0; type.reserved = 0; type.descriptor = 0; type.transform.params.size_h = -200; type.transform.params.size_v = 200; type.transform.params.skew_h = 0; type.transform.params.skew_v = 0; type.transform.params.rotation = 0; */ dtTypesetterSetTypeAttribs(engine, &type, 0);
Output of glyph R using the above type: