<< Click to Display Table of Contents >> Navigation: 3. Script Language > Image/Pixel-Color Operations > Undercover and Graphics > Undercover Operations |
MiniRobotLanguage (MRL)
UCV.set font
UCV.sft
Choose alternative font for printing and writing
Intention
This command enables you to choose an alternative font for printing and writing. Once you have used the "UCV.set font" command, the chosen font is use for all print and write commands.
will print text in the actual foreground color. Use the "UCV.foreground" command to set the foreground color. "UCV.print" will use the font that you can set using the "UCV.set font" command.
General usage is simple, here you can see an example:
UCV.nb
' Make a completely red cover
UCV.bgr|&HFF0000
UCV.cov
' Switch font color to yellow
UCV.fgr|&HFFFF00
UCV.font set|-|164|18||-350
UCV.write|Hello world!|350,20
PAU.5
' This will remove the Cover
UCV.
ENR.
You can print a text on the cover, like this:
'
UCV.nbi
' Make a gradient cover
UCV.gra|&HFF00FF|&HFFFF00
' Switch font color to yellow
UCV.fgr|&HFFFF00
UCV.font set|FuturaT|164|18||350
UCV.write|Hello world!|350,620
PAU.5
' This will remove the Cover
UCV.
ENR.
Syntax
UCV.set font[|P1][|P1][|P1][|P1][|P1]
UCV.sft[|P1][|P1][|P1][|P1][|P1]
Parameter Explanation
P1 - (optional) Fontname - String/variable with the Font name e.g. "Arial",
that should be used.
P2 - (optional) Fontsize - Value/variable with the Fontsize e.g. 64. Font-Sizes should
be in the Range between 4 and 260.
P3 - (optional) Fontstyle - Value/variable with the Fontstyle:
0 - Normal 4 - Underline
1 - Bold 8 - Strikeout
2 - Italic 16 - Leading
You can use these values or add them and use a combination of them.
P4 - (optional) Fontpitch - Value/variable with the Fontpitch:
0 - Default 32 - Swiss font (Helvetica, Swiss...)
1 - Fixed width font 48 - Modern font (Pica, Courier...)
2 - Variable width font 64 - Script font (Cursive...)
16 - Roman font (Times Roman...) 80 - Decorative (OldEnglish...)
You can use these values or add them and use a combination of them.
P5 - (optional) Escapement - Value/variable with the Font-Escapement:
Specifies the angle, in tenths of degrees, between the character base line and the x axis.
Allows printing of text on an angle. If this value is not zero, any vertical scrolling is disabled.
P6 - (optional) ANSI-Charset - Value/variable with the Font-Charset.
Please use directly the number, combinations are impossible.
Here are some possible Charset-numbers.
0 - ANSI CharSet 162 - Turkish CharSet
1 - Default CharSet 177 - Hebrew CharSet
2 - Symbol CharSet 178 - Arabic CharSet
77 - Mac CharSet 186 - Baltic CharSet
128 - Shiftjis CharSet 204 - Russian CharSet
129 - Hangeul CharSet 222 - Thai CharSet
130 - Johab CharSet 238 - East Europe CharSet
136 - Chinese CharSet 255 - OEM CharSet
161 - Greek CharSet
More Infos, see here:
Any of the parameters can be omitted, in that case the previous value is been used.
Example
'***********************************
' UCV.-Sample
' Shows scrolling text
'***********************************
'
$$TXT=Hallo my dear, try the PRINT command also ....
STR.CLONE|$$TXT|160|$$TXT
' no fading
UCV.nb
' set foreground color
UCV.fgr|&HFF0000
' set transparent background color
UCV.bgr|-1
UCV.mat
UCV.set font|futurat|40|||0
UCV.pri|$$TXT
PAU.4
UCV.
ENR.
Remarks
-
Limitations:
PopUp-Menus and other TopMost Forms may be able to get temporarily in front of the Cover-form. This is due to windows-technical reasons and not a bug.
See also:
• ! Smart Package Robot 's Undercover Operations
• ! UCV. - Undercover Graphics