Pascal
procedure tsFontSetCharParameteri(Char: WideChar; ParamName: tsEnum; Param: tsInt); procedure tsFontSetCharParameteriv(Char: WideChar; ParamName: tsEnum; pParam: ptsInt);
C/C++
void tsFontSetCharParameteri(WideChar Char, tsEnum ParamName, tsInt Param); void tsFontSetCharParameteriv(WideChar Char, tsEnum ParamName, tsInt * pParam);
With these functions you can control the properties of an existing char. You only can change properties of exsting chars. To create chars use the function tsFontAddChar.
|
Note |
|---|---|
|
To control the properties of the font you better should look at the function tsSetParamater and TS_FONT_??? for the param ParamName. |
|
This parameter contains the charcode of the char which you want to set some properties.
This parameter can have the following values.
The advance between the actual char an th following char. For more informations about the values of an char soo the font section.
The position of the glyph rect relative to the baseline and the starting point. The starting point is the beginning of the line or the position of the last char after advance was applied. These parameter return 2 values in a row. At first the value for X will be written at second the value for Y. For more informations about the values of an char soo the font section.
|
Note |
|---|---|
|
The ParamName TS_CHAR_GLYPHORIGIN only is available with the function tsFontSetCharParameteriv or tsFontGetCharParamateriv. |
|
The single value of the x glyph origin. For detailed information look for the ParamName TS_CHAR_GLYPHORIGIN or in the font section.
The single value of the y glyph origin. For detailed information look for the ParamName TS_CHAR_GLYPHORIGIN or in the font section.
The glyph rect marks the closest size of the char. It's dosn't contain things like shadows. It only describes the position and size of the glyph inside the whole image of the char. These parameter returns 4 values in Param. The values has following order Left, Top, Right and Bottom.
|
Note |
|---|---|
|
The ParamName TS_CHAR_GLYPHRECT only is available with the function tsFontSetCharParameteriv and tsFontGetCharParameteriv. |
|
This is only the value from the top of the gylph rect.
This is only the value from the left of the gylph rect.
This is only the value from the right of the gylph rect.
This is only the value from the bottom of the gylph rect.
The value of this parameter depends on the value in ParamName. For details look above.
This is the pointer variant of the Param.
There is no active context. See also tsContextBind.
There was no font bound to the actual context. See also tsFontBind.
If you pass an invalid value for the parameter ParamName.
This error occours in two situations.
If you pass nil / NULL for the prameter pParam.
If you pass an charcode from an not existing char to this function. Before you are able to change properties from an char you must create it with tsFontAddChar.