Pascal
function tsGetStringA(ParamName: tsEnum): pChar;
C/C++
char * tsGetStringA(tsEnum ParamName);
These function is compareable to tsGetParameter but you are only to query String properties. So the count of the available parameters are not to large. It returns a pointer of an nullterminated stringbuffer which contains the quered informations.
Following values are allowed.
The libraryversion as an string. It contains the mayor, minor version and the build number seperated by points. In some cases its possible that an additional text is placed after the version string. this text is seperated by an space.
0.8.0
This string contains the copyright informations of the library.
This is the copyrightinfo of the current bound font. If it's available.
|
Note |
|---|---|
|
With SDL_ttf as creator this information is never available. |
|
This is the name of the face from the fontfile you have used. If you write an program in which the user can choose an font normally this name will be shown.
This string contains the stylename of the current bound font.
|
Warning |
|---|---|
|
You are able to create an font creator with some styles (bold / italic). Under the GDI the fontmanagement in Windows (TM) can choose an different font so that you internally use an bold version of the font. This fact will have an effect to the stylename. But under SDL_ttf there is no global font management so the name dosn't be effected by some creation flags. |
|
This is an merge between the face an the style name. But these string are stored separately in the fonts so it's possible that this text can completely different. But it's not probably.
|
Note |
|---|---|
|
The language of the fontstrings depends on the selected fontcreator. With SDL_ttf as creator you always will get english strings. With the GDI as creator the language depends on the system language. If these strings are not available in the font then the next best language will be selected. |
|
The return value is a pointer of an nullterminated stringbuffer. If you pass an wrong ParamName to this function the result will be nil / NULL.
For the font informations you always need to have an bound context.
To query some informations about an font you need to have an bound font.
If you pass an unknown ParamName to this function this error will occour.