r3font

r3font

Class

oops/r3font.h

Library

r3oops

Description:

Font Class

See Also

oops/r3root.h

Super Class

r3Root

R3CLID_ROOT

JavaScript

r3Font

Class Identifier

R3CLID_FONT - 11

Methods

GETSTRLENGTH, BEGINOUTLINE, ENDOUTLINE, OUTLINECHAR,

Attributes

Font, Size, Ascent, Descent, XFont,

R3FM_GETSTRLENGTH

Method

GETSTRLENGTH

Identifier

R3FM_GETSTRLENGTH

Return

R3INT, length

Param 3:

char*, string whose length is to be measured

JavaScript

rc = obj.GETSTRLENGTH(p3);

Description

Find length of given string in pixels

R3FM_BEGINOUTLINE

Method

BEGINOUTLINE

Identifier

R3FM_BEGINOUTLINE

Return

R3BOOL, true if succeeded. Otherwise the R3RA_Error can

Param 3:

R3TAG*, R3RA_Error.

JavaScript

rc = obj.BEGINOUTLINE(p3);

Description

Prepare font for fetching outline curves.

R3FM_ENDOUTLINE

Method

ENDOUTLINE

Identifier

R3FM_ENDOUTLINE

JavaScript

obj.ENDOUTLINE();

Description

End outline char session.

R3FM_OUTLINECHAR

Method

OUTLINECHAR

Identifier

R3FM_OUTLINECHAR

Return

R3BOOL, true if character outline was succesfully fetched.

Param 1:

R3OBJ*, target object which can read outline description

Param 2:

R3INT, method with which the target object is called

Param 3:

R3INT, character to be outlined

JavaScript

rc = obj.OUTLINECHAR(p1, p2, p3);

Description

These methods are needed for fetching geometry of outline fonts. Not all fonts support this feature.

Font

Attribute

Font

Identifier

R3FA_Font

JavaScript type

String

C type

char*

Description

name of the font ###

Syntax


jsobj.SetFont(value);
value = jsobj.GetFont();


char* value = ...;
R3SetAttrs(r3obj, R3FA_Font, value, R3TAG_END);
char* value;
R3GetAttrs(r3obj, R3FA_Font, &value, R3TAG_END);

Size

Attribute

Size

Identifier

R3FA_Size

JavaScript type

Integer

C type

R3INT

Description

y size of the font

Syntax


value = jsobj.GetSize();


R3INT value;
R3GetAttrs(r3obj, R3FA_Size, &value, R3TAG_END);

Ascent

Attribute

Ascent

Identifier

R3FA_Ascent

JavaScript type

Integer

C type

R3INT

Description

ascenting

Syntax


value = jsobj.GetAscent();


R3INT value;
R3GetAttrs(r3obj, R3FA_Ascent, &value, R3TAG_END);

Descent

Attribute

Descent

Identifier

R3FA_Descent

JavaScript type

Integer

C type

R3INT

Description

descending

Syntax


value = jsobj.GetDescent();


R3INT value;
R3GetAttrs(r3obj, R3FA_Descent, &value, R3TAG_END);

XFont

Attribute

XFont

Identifier

R3FA_XFont

JavaScript type

String

C type

void*

Description

platform specific data. In X R3RA_SysObject gets the FontList and R3FA_XFont gets the FontStruct

Syntax


value = jsobj.GetXFont();


void* value;
R3GetAttrs(r3obj, R3FA_XFont, &value, R3TAG_END);

MAX_FONTNAMELEN

Tags

Tags

R3FA_Italic
R3FA_Bold
R3FA_Underline
R3FA_Template