4.4. tsFontAddChar

Syntax

Pascal

proce dure tsFontAddCharRange(CharStart: WideChar;
  CharEnd: WideChar);

procedure tsFontAddChars(Chars: pWideChar);

procedure tsFontAddChar(Char: WideChar);

C/C++

void tsFontAddCharRange(WideChar CharStart,
  WideChar CharEnd);

void tsFontAddChars(WideChar * Chars);

void tsFontAddChar(WideChar Char);

Description

These functions give you the ability to add chars to an font. It comes in three variants. One to add an single char, one to add an range of chars and one to add different chars in an null terminated widestring.

Params

CharStart

If you wants to add an range of chars this is the first char that will be added.

CharEnd

If you wants to add an range of chars this is the last char that will be added.

Chars

This param contains the pointer of an null terminated string with chars that will be added to the font. Existing chars wont be created multiple.

Char

This is an charcode from an singe char that will be added.

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_OPERATION

This error will happen if you try to create some chars with an font which hasn't the ability to create chars. So it's not an creator.

TS_INVALID_VALUE

This error occours if you pass nil / NULL as chars parameter.