Index

C/C++ Functions

dtTypesetterSetSizeSubscale

DT_SWORD dtTypesetterSetSizeSubscale(DT_DTENGINE engine, DT_UBYTE transform_params_mul_h, DT_UBYTE transform_params_mul_v, DT_UBYTE reserved)

Short Description: Set Typesetter's size subscale

The dtTypesetterSetSizeSubscale function sets a subscale for the size_h and size_v members of the DT_TRANSFORM_PARAMS structure. This instructs the Typesetter to interpret the size_h and size_v values as premultiplied (i.e. as subpixel quantities rather than whole pixels) and utilize fractional font sizing when scaling glyphs in the horizontal and/or vertical direction. In other words, despite the fact that size_h and size_v themselves are always integers, this function makes it possible to use fractional font sizing.

When D-Type Engine is initialized, fractional font sizing is disabled. This means that size_h and size_v values are interpreted as whole pixels. This is a recommended setup for most applications.

Parameters

ParameterDescription

engine

Handle of the previously created Standard Engine instance.

transform_params_mul_h

Scale multiplier for the size_h member of the DT_TRANSFORM_PARAMS structure. For example, if transform_params_mul_h is set to 4, then size_h is interpreted as font width in 1/4 pixels. In that case, size_h = 42 represents a font width of 10.5 pixels (42/4), while size_h = 55 represents a font width of 13.75 pixels (55/4).

This value must be positive. The value 1 will disable fractional font sizing in the horizontal direction. In this case, size_h values are interpreted as whole pixels.

transform_params_mul_v

Scale multiplier for the size_v member of the DT_TRANSFORM_PARAMS structure. For example, if transform_params_mul_v is set to 4, then size_v is interpreted as font height in 1/4 pixels. In that case, size_v = 42 represents a font height of 10.5 pixels (42/4), while size_v = 55 represents a font height of 13.75 pixels (55/4).

This value must be positive. The value 1 will disable fractional font sizing in the vertical direction. In this case, size_v values are interpreted as whole pixels.

reserved

Reserved for future use. Must be set to 0.

Return Value

If successful, the return value is 1. Otherwise, the function returns 0.

Comments

This function should be called only when fractional font sizing is truly needed. Even then, we do not recommend that you ever set transform_params_mul_h or transform_params_mul_v to a value larger than 8. Doing so will reduce the effectiveness of the bitmap cache. A value of 4 should be more than adequate for most needs. If the fractional font sizing is not needed, it is best to set both values to 1 (or not to call this function in the first place).

 

Index