4.7. tsFontGetCharParameter

Syntax

Pascal

function tsFontGetCharParameteri(Char: WideChar;
  ParamName: tsEnum): tsInt;

procedure tsFontGetCharParameteriv(Char: WideChar;
  ParamName: tsEnum; pParam: ptsInt);

C/C++

tsInt tsFontGetCharParameteri(WideChar Char,
  tsEnum ParamName);

void tsFontGetCharParameteriv(WideChar Char,
  tsEnum ParamName, tsInt * pParam);

Description

This function is the complement to tsFontSetCharParameter. With it you are able to query all the parameters you can set with tsFontSetCharParameter. But you only can query properties from exsting chars. To create chars use the function tsFontAddChar.

Params

Char

This parameter contains the charcode of the char from which you want to query some properties.

ParamName

For an complete list of valid values for this parameter see the function tsFontSetCharParameter.

pParam

This is the pointer variant of the return value.

Return Value

The return value depends on the value in ParamName. For details see the function tsFontSetCharParameter.

Error Codes

TS_NO_ACTIVE_CONTEXT

There is no active context. See also tsContextBind.

TS_NO_ACTIVE_FONT

There was no font bound to the actual context. See also tsFontBind.

TS_INVALID_ENUM

If you pass an invalid value for the parameter ParamName.

TS_INVALID_VALUE

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.